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

xml transform — Transform XML documents using XSLT. More information: <https://xmlstar.sourceforge.net/doc/UG/xmlsta

Submitted by: @import:tldr-pages··
0
Viewed 0 times
transformcommandxml transformxsltcliusingdocumentsxml

Problem

How to use the xml transform command: Transform XML documents using XSLT. More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139602800>.

Solution

xml transform — Transform XML documents using XSLT. More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139602800>.

Transform an XML document using an XSL stylesheet, passing one XPATH parameter and one literal string parameter:
xml {{[tr|transform]}} {{path/to/stylesheet.xsl}} -p "{{Count='count(/xml/table/rec)'}}" -s {{Text="Count="}} {{path/to/input.xml|URI}}


Display help:
xml {{[tr|transform]}} --help

Code Snippets

Transform an XML document using an XSL stylesheet, passing one XPATH parameter and one literal string parameter

xml {{[tr|transform]}} {{path/to/stylesheet.xsl}} -p "{{Count='count(/xml/table/rec)'}}" -s {{Text="Count="}} {{path/to/input.xml|URI}}

Display help

xml {{[tr|transform]}} --help

Context

tldr-pages: common/xml transform

Revisions (0)

No revisions yet.