SAXONB-XQUERY(1)
β¨ saxonb-xquery(1) β¨ β the command line XQuery processor
okay bestie, welcome to section 1 of the manual, this is the saxonb-xquery era and we're gonna get you fluent in it π
π« NAME π«
saxonb-xquery β command line XQuery processor. that's it, that's the vibe π¦
πΈ SYNOPSIS πΈ
saxonb-xquery [OPTION...] QUERYFILE [NAME=VALUE...]
π DESCRIPTION π
So this page is the lil manual for the saxonb-xquery command, and ngl it exists purely because the Debianβ’ distribution needed it β the original program never shipped a manpage of its own π. It does have HTML documentation though, and that lives in the libsaxonb-java-doc package, iykyk.
saxonb-xquery is a command line wrapper around the Saxon-B XSLT and XQuery processor. The whole point? You can evaluate XQuery queries straight from the command line, no cap. Under the hood it's a wrapper around the Java class net.sf.saxon.Query, which is implemented by Saxon-B π₯
The way you call it: you pass a required filename containing the XQuery query you want evaluated. And listen β the special filename "-" can be given if you want it to read the query from standard input instead π
Before the query filename, you can hand it a list of options β see below, we get into all of them.
π§ Parameters
At the end of the command line, a list of parameters can be given. Parameters use the syntax NAME=VALUE, so you're specifying parameter names and their values, periodt.
- A parameter name prefixed with
"+"(plus sign) gets interpreted as a filesystem path parameter. If the path points to a single file, that file is parsed as XML and its document node gets passed as the parameter value. If the path points to a directory, all directly contained files get parsed as XML files, and the sequence of their document nodes gets passed as the parameter value π - A parameter name prefixed with
"!"(exclamation mark) gets interpreted as an output/serialization parameter. Peep the specifications of XQuery and XSLT 2.0 if you want more on output/serialization parameters. - To pass parameters that belong to a non-null namespace, the syntax
{uri}localname=valueis provided π
Parameters will be visible as external variables during query evaluation β but only provided they've been declared in the query prolog, so don't come crying if you skipped that part. See the XQuery specification for more on variables and their declarations.
β¨ OPTIONS β¨
A summary of supported options is included below. Options can be passed in any order, no stress π«Ά
We first report the options shared by saxonb-xquery and saxonb-xslt, then the ones specific to saxonb-xquery (or the ones that have different semantics).
Some options are flagged as "Saxon-SA only" β those only work if Saxon-SA is installed. Heads up: Saxon-SA is a commercial product, so it is not available in Debian. π
π Common options
-cr:classnameβ specify a class to be used for processing collection URIs passed to thecollection()function. The class must implementnet.sf.saxon.CollectionURIResolver.-dtd: {[on] | [off]}β enable or disable DTD validation. Default:off.-expand: {[on] | [off]}β when validation is enabled, expand default values in validated documents. This option enables or disables such an expansion. Default:on.-explain [:filename]β display an execution plan; the output is in XML format. Iffilenameis not given it will be displayed on standard output.-ext: {[on] | [off]}β enable or disable the ability to invoke external Java functions from query files and stylesheets. Beware: enabling them is a potential security risk when processing untrusted files. Default:off.-l: {[on] | [off]}β keep (whenon) or throw away (whenoff) line numbers in trees corresponding to source documents. When kept, line numbers can be accessed using the functionsaxon:line-number(). Default:off.-outval: {[recover] | [fatal]}β when validation is required, set whether validation errors are fatal (when"fatal"is passed) or if they only trigger warnings (when"recover"is). Default:fatal.-p: {[on] | [off]}β enable or disable usage of thePTreeURIResolver. Saxon-SA only.-r:classnameβ specify a class to be used for resolving all URIs.-repeat:Nβ repeat the transformationNtimes. For benchmarking purposes.-saβ perform schema-aware processing. Saxon-SA only.-strip: {[all] | [none] | [ignorable]}β specify the whitespace stripping policy for source documents: strip all of them ("all"), strip none of them ("none"), strip ignorable whitespace only ("ignorable"). Default:none.-tβ display version, timing, and other debugging information on standard error.-tree: {[tiny] | [linked]}β select the implementation of the internal tree model: tiny tree model ("tiny") or linked tree model ("linked"). See the Saxon documentation for more on the internal tree model. Default:tiny.-T [:classname]β trace various aspects of the processing; an optional class name can be given to specify a user-chosen tracer. The class must implementnet.sf.saxon.trace.TraceListener. The default is a system supplied tracer. This option implies-l.-TJβ enable tracing of external Java method invocation. See-ext.-uβ force interpretation of source document names as URI. By default they are considered to be file names, unless they start with"file:"or"http:".-val: {[strict] | [lax]}β when validation is enabled, choose among"strict"or"lax"validation. Saxon-SA only.-x:classnameβ specify a class to be used as SAX parser for input documents. The class must implement eitherorg.xml.sax.Parserororg.xml.sax.XMLReader.-xiβ apply XInclude processing to all input documents.-xmlversion: {[1.0] | [1.1]}β choose the XML version for processing input documents."1.1"must be specified to process XML 1.1 and Namespaces 1.1 constructs. Default:1.0.-?β display a help message and exit.
π¦ Options specific to saxonb-xquery
-mr:classnameβ use the specified class as aModuleURIResolverto resolve query module URIs. The class must implementnet.sf.saxon.query.ModuleURIResolver.-o:filenameβ send the query output to the specified filename. If not specified, the output will be sent to standard output. See also-wrap.-pipe: {[push] | [pull]}β internally, execute query in push or pull mode. Mainly for testing purposes. Push mode is usually faster when intermediate trees are constructed in memory. Default:push.-projection: {[on] | [off]}β enable or disable document projection, i.e. the ability to throw away tree parts which will not be accessed by a query. Saxon-SA only.-s: {[file] | [URI]}β read document input from the specified filename ("-"can be given to read from standard input). The read document will be available to the query as the context node.-uaffects howfilenameis interpreted.-wrap: {[on] | [off]}β enable or disable wrapping of query result in an XML structure which makes explicit the kind of each output node or atomic value. For example, free-standing attributes will be wrapped in an explicit XML element stating that they are attributes. When this is off, the query output will be wrapped only using a document node; in such a setting it is possible that output parts, such as free-standing attributes, can't be serialized. Default:off.
π SEE ALSO π
saxonb-xslt(1)- XQuery 1.0: An XML Query Language (W3C Recommendation)
This program is fully documented by the HTML documentation of Saxon, available in the libsaxon-java-doc Debian package π
π AUTHOR π
This manual page was written by Stefano Zacchiroli <zack@debian.org> for the Debianβ’ system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
π COPYRIGHT π
Copyright Β© 2008 Stefano Zacchiroli
and that's the whole page bestie, we ate that π
β¨ it's from February 2008, and yeah, it's SAXONB-XQUERY(1) all the way down π go run some queries, you got this π«Ά
π¦ where this page comes from
- debian bookworm: libsaxonb-java 9.1.0.8+dfsg-2
- debian trixie: libsaxonb-java 9.1.0.8+dfsg-3
- ubuntu jammy: libsaxonb-java 9.1.0.8+dfsg-2
- ubuntu noble: libsaxonb-java 9.1.0.8+dfsg-2
- ubuntu questing: libsaxonb-java 9.1.0.8+dfsg-3
- ubuntu resolute: libsaxonb-java 9.1.0.8+dfsg-4 Β· MPL-1.0
- ubuntu stonking: libsaxonb-java 9.1.0.8+dfsg-4 Β· MPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms