xsltproc
Transform XML documents using XSL stylesheets
SYNOPSIS
xsltproc [options] stylesheet xmlfile
PARAMETERS
-V | --version
Show the version of libxslt and libxml used.
-v | --verbose
Run in verbose mode.
-o | --output file
Direct output to the specified file.
--timing
Display profiling information.
--repeat
Repeat the transformation 20 times.
--debug
Run the XSLT debugger.
--novalid
Skip loading the document DTD.
--noout
Suppress output.
--maxdepth value
Set the maximum depth of templates
--html
The input document is an HTML file.
--txt
Output is plain text.
--param name value
Pass a stylesheet parameter with a string value.
--stringparam name value
Pass a stylesheet parameter with a string value without evaluation.
--nonet
Refuse to fetch DTDs or entities over the network.
--path paths
Set the list of paths used for the document() function.
--load-trace
Display trace of all documents loaded
--catalogs
Use the catalogs from /etc/xml/catalog to resolve external entities.
--xinclude
Process the input document using XInclude.
--profile profile_output_file
Dump profile information into a file. Requires --timing option.
--dumpextensions
Dumps the list of used extensions.
DESCRIPTION
The xsltproc command is a command-line tool for applying XSLT stylesheets to XML documents. It's part of libxslt, a widely used XSLT processor library. xsltproc transforms XML documents into other formats, such as HTML, text, or even other XML formats, based on the instructions provided in the XSLT stylesheet.
It accepts both XML and XSLT files as input, allowing users to specify the stylesheet and XML document to be processed. The tool is commonly used for data transformation, report generation, and other XML-related tasks.
xsltproc is known for its efficiency and standards compliance, making it a reliable choice for handling XSLT transformations on the command line. It's a valuable tool for developers, system administrators, and anyone working with XML data and requires automated transformation processes.
CAVEATS
The command relies on properly formatted XML and XSLT documents. Errors in these files may lead to unexpected output or processing failures. Network access is required if the XML or XSLT documents reference external resources and `--nonet` is not specified.
STYLESHEET INTERPRETATION
The stylesheet is expected to follow W3C's XSLT standards. It provides the rules for transforming the input XML document.
ERROR HANDLING
xsltproc provides basic error reporting. The verbose mode (-v) may give more insights during processing.
HISTORY
xsltproc was developed as part of the libxslt library, originating from the GNOME project. It became a standard tool for applying XSLT transformations on Linux and other Unix-like systems. Its usage has grown steadily due to the increasing need for automated XML processing and data transformation.
SEE ALSO
xmllint(1)