Altova RaptorXML Server 2023

The xslt command takes an XSLT file as its single argument and uses it to transform an input XML file to produce an output file. The input and output files are specified as options.


raptorxml xslt [options] XSLT-File


The XSLT-File argument is the path and name of the XSLT file to use for the transformation.

An input XML file (--input) or a named template entry point (--template-entry-point) is required.

To transform JSON data, load the JSON data via the json-doc(\$path) function of XPath 3.1, and use the xslt command's --initial-match-selection option. See the last item in the examples given below.

If no --output option is specified, output is written to standard output. You can use XSLT 1.0, 2.0, or 3.0. By default XSLT 3.0 is used.



Examples of the xslt command:


raptorxml xslt --input=c:\Test.xml --output=c:\Output.xml c:\Test.xslt

raptorxml xslt --template-entry-point=StartTemplate --output=c:\Output.xml c:\Test.xslt

raptorxml xslt --input=c:\Test.xml --output=c:\Output.xml --param=date://node[1]/@att1 --p=title:'stringwithoutspace' --param=title:"'string with spaces'" --p=amount:456 c:\Test.xslt

raptorxml xslt --initial-match-selection=json-doc('MyData.json',map{'liberal':true()}) --output=c:\MyData.xml c:\Test.xslt

raptorxml xslt --initial-match-selection="json-doc('MyData.json', map{'liberal':true()})" --output=c:\MyData.xml c:\Test.xslt  (If the json-doc argument string contains spaces, then enclose the entire json-doc value in quotes.)




Options are listed in short form (if available) and long form. You can use one or two dashes for both short and long forms. An option may or may not take a value. If it takes a value, it is written like this: --option=value. Values can be specified without quotes except in two cases: (i) when the value string contains spaces, or (ii) when explicitly stated in the description of the option that quotes are required. If an option takes a Boolean value and no value is specified, then the option's default value is TRUE. Use the --h, --help option to display information about the command.



© 2016-2022 Altova GmbH