The msxsl.exe command line utility enables you to perform command line Extensible Stylesheet Language (XSL) transformations using the Microsoft XSL processor, the Msxsl.exe utility invokes the Microsoft XML Parser 6.0 (msxml6.dll) to perform the transformation.
Because msxsl.exe is only a wrapper, Microsoft Core XML Services (MSXML) must be installed on the computer. You can download Microsoft Core XML Services (MSXML) 6.0 from the Microsoft Download Center.
Usage
The usage of MSXSL is as follows. Individual options may appear anywhere.
MSXSL source stylesheet [options] [param=value...] [xmlns:prefix=uri...]
Options:
-? Show this message
-o filename Write output to named file
-m startMode Start the transform in this mode
-xw Strip non-significant whitespace from source and stylesheet
-xe Do not resolve external definitions during parse phase
-v Validate documents during parse phase
-t Show load and transformation timings
-pi Get stylesheet URL from xml-stylesheet PI in source document
-u version Use a specific version of MSXML: '3.0', '4.0', '6.0'
- Dash used as source argument loads XML from stdin
- Dash used as stylesheet argument loads XSL from stdin
Parameters
Although MSXML allows parameters of any XSLT type to be passed to the style sheet, MSXSL allows only strings. Parameters are specified using a list of name-value pairs following the source and style sheet arguments.
MSXSL –o out.xml books.xml format.xsl p1=Microsoft p2='XSL Transformations'
Any number of parameters may be specified, as long as white space separates a parameter value from the next parameter name. Parameter names must conform to the XML QName syntax, with an optional prefix separated from a local name by a colon character.
MSXSL books.xml format.xsl my-ns:param='XPath 1.0' xmlns:my-ns='urn:my'
If a prefix is specified, it must be defined in a namespace declaration elsewhere on the command line. The prefix cannot be "xmlns" because this identifies a namespace declaration.