SAXONB-XSLT(1)
β¨ SAXONB-XSLT(1) β¨
okay bestie, welcome to the saxonb-xslt manual page, section 1 of the manual π this is the command line XSLT 2.0 processor and she is that girl. let's get into it π
πΈ NAME πΈ
saxonb-xslt β command line XSLT 2.0 processor
β¨ SYNOPSIS β¨
saxonb-xslt [OPTION...] [-s:SOURCEFILE] [-xsl:STYLESHEET] [-o:OUTPUT]
[NAME=VALUE...]
π¦ DESCRIPTION π¦
ngl this page is just a lil quick intro to the saxonb-xslt command. it was written for the Debianβ’ distribution because the original program does not ship a manual page π instead it has HTML documentation, which lives in the libsaxonb-java-doc package. so like, go read that if you want the full lore.
so what is it? saxonb-xslt is a command line wrapper around the Saxon-B XSLT and XQuery processor. with it you can process XML documents using XSLT 2.0 stylesheets, straight from the command line, no cap. internally, saxonb-xslt is a wrapper around the Java class net.sf.saxon.Transform, which Saxon-B implements. main character energy fr fr π
you'll usually invoke saxonb-xslt passing the 3 options that are made explicit in the synopsis above. usually those three map to: the input XML file you wanna transform, the XSLT stylesheet describing the transformation you want, and the output file where the result gets saved. periodt. but β and this is the plot twist β the meaning of those options and whether you even need to pass them depends on a whole bunch of other options you can specify. see the option reference below, bestie, it's all there π«Ά
π Parameters
at the end of the command line you can drop a list of parameters. they use the syntax NAME=VALUE, so you give the parameter's name and its value together.
a parameter name prefixed with + (plus sign) gets interpreted as a filesystem path parameter. if the path points to a single file, that file gets parsed as XML and its document node becomes the parameter value. if the path points to a directory, every directly contained file gets parsed as XML files, and the sequence of their document nodes becomes the parameter value. cute, right?
a parameter name prefixed with ! (exclamation mark) gets interpreted as an output/serialization parameter. check the XSLT 2.0 and XQuery specs for more on output/serialization parameters, iykyk.
to pass parameters that belong to a non-null namespace, there's a syntax for that: {uri}localname=value.
parameters will be visible as global variables during XSLT processing β provided they've been declared with <xsl:param>. and during evaluation, provided they've been declared in the query prolog. see the XSLT spec for more on variables and their declarations π
π OPTIONS π
here's a summary of everything supported, bestie. options can be passed in any order, so do your thing.
first we list the options that saxonb-xslt and saxonb-xquery share, then the ones specific to saxonb-xslt (or the ones that behave differently here).
some options are flagged as "Saxon-SA only" β those only work if Saxon-SA is installed. and heads up: Saxon-SA is a commercial product, so as such it is not available in Debian. π
π Common options
-cr:classnameβ specify a class to use for processing collection URIs passed to thecollection()function. the class must implementnet.sf.saxon.CollectionURIResolver.-dtd: {[on] | [off]}β turn DTD validation on or off. default:off.-expand: {[on] | [off]}β when validation is enabled, expand default values in validated documents. this option enables or disables that expansion. default:on.-explain [:filename]β display an execution plan; the output is in XML format. iffilenameisn't given it gets 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 you're 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 (whenfatalis passed) or whether they only trigger warnings (whenrecoveris). default:fatal.-p: {[on] | [off]}β enable or disable usage of thePTreeURIResolver. Saxon-SA only.-r:classnameβ specify a class to use for resolving all URIs.-repeat:Nβ repeat the transformationNtimes. for benchmarking purposes, bestie.-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; you can optionally give a class name 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're considered to be file names, unless they start withfile:orhttp:.-val: {[strict] | [lax]}β when validation is enabled, choose betweenstrictorlaxvalidation. Saxon-SA only.-x:classnameβ specify a class to use 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. you must specify1.1to process XML 1.1 and Namespaces 1.1 constructs. default:1.0.-?β display a help message and exit.
π§ Options specific to saxonb-xslt
-aβ use the"<?xml-stylesheet ... ?>"processing instruction from the source document to find the stylesheet to be used. this option is not compatible with-xsl.-c:filenameβ use the compiled stylesheet stored infilename. this option is not compatible with-xsl.-im:modenameβ usemodenameas the initial mode used for the transformation. qualified modes can be specified as"{uri}localname".-it:templatenameβ usetemplatenameas the initial named template for the transformation. when this option is used,-xslis optional.-m:classnameβ specify a class to use as the receiver for messages generated by<xsl:message>. the class must implementnet.sf.saxon.event.Receiver.-o:pathβ specify the path to use for saving generated output. usuallypathpoints to a filename where the main result document will be saved. if it's not specified, such a document gets written to standard output. additional output documents generated using the<xsl:result-document>command usepathas the basename for the"href"attribute of the command. if-ois missing they'll be saved relatively to the current working directory. when-sidentifies a directory,-oshould identify one too. all the output documents will then be written under that directory.-or:classnameβ specify a class to use as the output resolver for the"href"attribute of<xsl:result-document>. the class must implementnet.sf.saxon.OutputURIResolver.-s:pathβ specify the input file or directory. this option is required unless-ithas been given. ifpathpoints to a filename, that file gets parsed as an XML document and its document node becomes the context item at the beginning of the transformation. the special filename-can be used to require reading the input document from standard input. ifpathpoints to a directory, all files directly contained in it get individually transformed. in that case-ois required.-uaffects the interpretation ofpath.-versmsg: {[on] | [off]}β enable or disable the warning about using an XSLT 2.0 processor (which Saxon-B is) on stylesheets which specifyversion="1.0"in their root element. default:on.-warnings: {[silent] | [recover] | [fatal]}β set the policy for handling recoverable errors:silentfor silent recovery,recoverfor recovery with warning output on standard error,fatalfor no recovery. default:recover.-xsl:filenameβ specify the main XSLT stylesheet to be used for the transformation. this option is required unless-aor-care specified. the special filename-can be used to require reading the stylesheet from standard input.-uaffects the interpretation offilename.-y:filenameβ specify a class to use as SAX parser for stylesheets. the class must implement eitherorg.xml.sax.Parserororg.xml.sax.XMLReader. see also-x.
π SEE ALSO π
saxonb-xquery (1), XSL Transformations (XSLT) Version 2.0 (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 it may be used by others, we love sharing π«Ά). 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
okay that's the whole page bestie, you ate that π β¨ this was the saxonb-xslt(1) man page, from February 2008 β go forth and transform some XML, you've 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