SaxonHe.Query (saxon_he v12.5.2)

Copy Markdown

Wrapper de saxon-he query (XQuery). Espejo de query.ts.

Hereda los flags comunes de SaxonHe.CliShare y agrega los específicos de query (-q, -qs, -projection, etc).

{:ok, output} =
  SaxonHe.Query.new()
  |> SaxonHe.Query.q("query.xq")
  |> SaxonHe.Query.s("data.xml")
  |> SaxonHe.Query.run()

Summary

Functions

Append -a:on|off (backup mode for XQuery Update).

Append -catalog:filenames.

Append -config:filenames.

Append -dtd:on|off|recover.

Append -expand:on|off.

Append -ext:on|off.

Append --feature:value.

Append -init:initializer.

Append -l:on|off (line numbers).

Append -mr:classname (Module URI Resolver).

Append -now:format.

Append -o:filename (output file).

Append -opt:-flags (optimization flags).

Alias de o/2 con nombre más descriptivo (no parte del CLI de Saxon).

Append -outval:recover|fatal.

Append -p:on|off.

Append -projection:on|off.

Append -q:queryfile.

Append -qs:querystring (XQuery inline).

Alias para q/2 con nombre más descriptivo.

Append -quit:on|off.

Append -r:classname (URI resolver).

Append -repeat:N.

Ejecuta <binary> <args> (default binary: query). Mismas opciones que SaxonHe.Transform.run/2.

Append -s:filename (source XML). Lanza si el archivo no existe.

Append -sa (schema-aware).

Append -scmin:filename (schema component model file).

Alias de s/2 (no parte del CLI de Saxon).

Append -stream:on|off.

Append -strip:all|none|ignorable.

Append -t (timing/version info).

Append -Tlevel:none|low|normal|high.

Append -T:classname (TraceListener).

Append -Tout:filename.

Append -TB:filename.

Append -TJ (trace external Java method calls).

Append -TP:filename (profiling output).

Append -traceout:filename.

Append -tree:linked|tiny|tinyc.

Append -u (treat source as URI).

Append -update:on|off|discard.

Append -val:strict|lax.

Append -wrap.

Append -x:classname (SAX parser for source).

Append -xi:on|off (XInclude).

Append -xmlversion:1.0|1.1.

Append -xsd:file.

Append -xsdversion:1.0|1.1.

Append -xsiloc:on|off.

Types

t()

@type t() :: %SaxonHe.Query{args: [String.t()], binary: String.t()}

Functions

backup(t, opt)

Append -a:on|off (backup mode for XQuery Update).

build_args(query)

@spec build_args(t()) :: [String.t()]

catalog(t, filenames)

Append -catalog:filenames.

config(t, filenames)

Append -config:filenames.

dtd(t, opt)

Append -dtd:on|off|recover.

expand(t, opt)

Append -expand:on|off.

ext(t, opt)

Append -ext:on|off.

feature(t, value)

Append --feature:value.

init(t, initializer)

Append -init:initializer.

l(t, opt)

Append -l:on|off (line numbers).

mr(t, classname)

Append -mr:classname (Module URI Resolver).

new(opts \\ [])

@spec new(keyword()) :: t()

now(t, format)

Append -now:format.

o(t, filename)

Append -o:filename (output file).

opt(t, flags)

Append -opt:-flags (optimization flags).

output(t, filename)

Alias de o/2 con nombre más descriptivo (no parte del CLI de Saxon).

outval(t, opt)

Append -outval:recover|fatal.

p(t, opt)

Append -p:on|off.

projection(t, opt)

Append -projection:on|off.

q(t, queryfile)

Append -q:queryfile.

qs(t, querystring)

Append -qs:querystring (XQuery inline).

query_file(t, queryfile)

Alias para q/2 con nombre más descriptivo.

quit(t, opt)

Append -quit:on|off.

r(t, classname)

Append -r:classname (URI resolver).

repeat(t, n)

Append -repeat:N.

run(query, opts \\ [])

@spec run(
  t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Ejecuta <binary> <args> (default binary: query). Mismas opciones que SaxonHe.Transform.run/2.

s(t, filename)

Append -s:filename (source XML). Lanza si el archivo no existe.

sa(t)

Append -sa (schema-aware).

scmin(t, filename)

Append -scmin:filename (schema component model file).

source(t, filename)

Alias de s/2 (no parte del CLI de Saxon).

stream(t, opt)

Append -stream:on|off.

strip(t, opt)

Append -strip:all|none|ignorable.

t(t)

Append -t (timing/version info).

t_level(t, level)

Append -Tlevel:none|low|normal|high.

t_listener(t, classname)

Append -T:classname (TraceListener).

t_out(t, filename)

Append -Tout:filename.

tb(t, filename)

Append -TB:filename.

tj(t)

Append -TJ (trace external Java method calls).

tp(t, filename)

Append -TP:filename (profiling output).

traceout(t, filename)

Append -traceout:filename.

tree(t, level)

Append -tree:linked|tiny|tinyc.

u(t)

Append -u (treat source as URI).

update(t, opt)

Append -update:on|off|discard.

val(t, opt)

Append -val:strict|lax.

wrap(t)

Append -wrap.

x(t, classname)

Append -x:classname (SAX parser for source).

xi(t, opt)

Append -xi:on|off (XInclude).

xmlversion(t, opt)

Append -xmlversion:1.0|1.1.

xsd(t, file)

Append -xsd:file.

xsdversion(t, opt)

Append -xsdversion:1.0|1.1.

xsiloc(t, opt)

Append -xsiloc:on|off.