HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

xsltproc — Transform XML with XSLT to produce output (usually HTML or XML). More information: <https://manned.o

Submitted by: @import:tldr-pages··
0
Viewed 0 times
transformcommandxsltprocxsltcliproducewithxml
macos

Problem

How to use the xsltproc command: Transform XML with XSLT to produce output (usually HTML or XML). More information: <https://manned.org/xsltproc>.

Solution

xsltproc — Transform XML with XSLT to produce output (usually HTML or XML). More information: <https://manned.org/xsltproc>.

Transform an XML file with a specific XSLT stylesheet:
xsltproc --output {{path/to/output_file.html}} {{path/to/stylesheet_file.xslt}} {{path/to/file.xml}}


Pass a value to a parameter in the stylesheet:
xsltproc --output {{path/to/output_file.html}} --stringparam "{{name}}" "{{value}}" {{path/to/stylesheet_file.xslt}} {{path/to/xml_file.xml}}

Code Snippets

Transform an XML file with a specific XSLT stylesheet

xsltproc --output {{path/to/output_file.html}} {{path/to/stylesheet_file.xslt}} {{path/to/file.xml}}

Pass a value to a parameter in the stylesheet

xsltproc --output {{path/to/output_file.html}} --stringparam "{{name}}" "{{value}}" {{path/to/stylesheet_file.xslt}} {{path/to/xml_file.xml}}

Context

tldr-pages: osx/xsltproc

Revisions (0)

No revisions yet.