/ .. / / -> download
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "xml\-transform" "1" "2020\-07\-07" "" "xml\-utils"
.hy
.SH NAME
.PP
xml\-transform \- Apply XSL transformations to XML documents
.SH SYNOPSIS
.IP
.nf
\f[C]
xml\-transform\ [\-s\ <stylesheet>\ [\-p\ <name>=<value>\ ...]\ ...]
\ \ \ \ \ \ \ \ \ \ \ \ \ \ [\-o\ <file>]\ [\-cdfilqSvh?]\ [<file>\ ...]
\f[]
.fi
.SH DESCRIPTION
.PP
Applies one or more XSLT stylesheets to one or more XML documents.
.SH OPTIONS
.TP
.B \-c, \-\-combine
Transform the input files as a single, combined XML document, rather
than as individual documents.
.RS
.RE
.TP
.B \-d, \-\-preserve\-dtd
Preserve the DTD of the original document when transforming.
.RS
.RE
.TP
.B \-f, \-\-overwrite
Overwrite the specified files instead of writing to stdout.
.RS
.RE
.TP
.B \-h, \-?, \-\-help
Show usage message.
.RS
.RE
.TP
.B \-i, \-\-identity
Includes an "identity" template in to each specified stylesheet.
.RS
.RE
.TP
.B \-l, \-\-list
Treat input (stdin or arguments) as lists of files to transform, rather
than files themselves.
.RS
.RE
.TP
.B \-o, \-\-out <file>
Output to <file> instead of stdout.
This option only makes sense when the input is a single XML document.
.RS
.RE
.TP
.B \-p, \-\-param <name>=<value>
Pass a parameter to the last specified stylesheet.
If specified before any stylesheets, the parameter will be passed to all
stylesheets.
.RS
.RE
.TP
.B \-q, \-\-quiet
Quiet mode.
Errors are not printed.
.RS
.RE
.TP
.B \-S, \-\-xml\-stylesheets
Apply stylesheets that are associated to each XML document with the
\f[C]xml\-stylesheet\f[] processing instruction.
Associated stylesheets are applied before any user\-specified
stylesheets, in the order in which they occur within the document.
.RS
.RE
.TP
.B \-s, \-\-stylesheet <stylesheet>
An XSLT stylesheet file to apply to each XML document.
Multiple stylesheets can be specified by supplying this argument
multiple times.
The stylesheets will be applied in the order they are listed.
.RS
.RE
.TP
.B \-v, \-\-verbose
Verbose output.
.RS
.RE
.TP
.B \-\-version
Show version information.
.RS
.RE
.TP
.B <file> ...
Any number of XML documents to apply all specified stylesheets to.
.RS
.RE
.PP
In addition, the following options allow configuration of the XML
parser:
.TP
.B \-\-dtdload
Load the external DTD.
.RS
.RE
.TP
.B \-\-huge
Remove any internal arbitrary parser limits.
.RS
.RE
.TP
.B \-\-net
Allow network access to load external DTD and entities.
.RS
.RE
.TP
.B \-\-noent
Resolve entities.
.RS
.RE
.TP
.B \-\-xinclude
Do XInclude processing.
.RS
.RE
.TP
.B \-\-xml\-catalog <file>
Use an XML catalog when resolving entities.
Multiple catalogs may be loaded by specifying this option multiple
times.
.RS
.RE
.SS Identity template
.PP
The \-i option includes an "identity" template in to each stylesheet
specified with the \-s option.
The template is equivalent to this XSL:
.IP
.nf
\f[C]
<xsl:template\ match="\@*|node()">
<xsl:copy>
<xsl:apply\-templates\ select="\@*|node()"/>
</xsl:copy>
</xsl:template>
\f[]
.fi
.PP
This means that any attributes or nodes which are not matched by a more
specific template in the user\-specified stylesheet are copied.
.SH EXAMPLE
.IP
.nf
\f[C]
$\ xml\-transform\ \-s\ <XSL>\ <doc1>\ <doc2>\ ...
\f[]
.fi
.SH AUTHORS
khzae.net.


/ gopher://khzae.net/0/s1000d/xml/xml-utils/src/utils/xml-transform/doc/xml-transform.1
Styles: Light Dark Classic