# XSLTPROC(1) - man - phpman

[XSLTPROC(1)](https://www.chedong.com/phpMan.php/man/XSLTPROC/1/markdown)                                xsltproc Manual                               [XSLTPROC(1)](https://www.chedong.com/phpMan.php/man/XSLTPROC/1/markdown)



## NAME
       xsltproc - command line XSLT processor

## SYNOPSIS
       **xsltproc** [[**-V** | **--version**] [**-v** | **--verbose**] [{**-o** | **--output**} {_FILE_ | _DIRECTORY_}] | **--timing** |
                **--repeat** | **--debug** | **--novalid** | **--noout** | **--maxdepth** _VALUE_ | **--html** |
                **--encoding** _ENCODING_  | **--param** _PARAMNAME_ _PARAMVALUE_  |
                **--stringparam** _PARAMNAME_ _PARAMVALUE_  | **--nonet** | **--path** **"**_PATH(S)_**"** | **--load-trace** |
                **--catalogs** | **--xinclude** | [**--profile** | **--norman**] | **--dumpextensions** | **--nowrite** |
                **--nomkdir** | **--writesubtree** _PATH_ | **--nodtdattr**] [_STYLESHEET_] {_XML-FILE_... | -}

## DESCRIPTION
       **xsltproc** is a command line tool for applying XSLT stylesheets to XML documents. It is part of
       [**libxslt**(3)](https://www.chedong.com/phpMan.php/man/libxslt/3/markdown), the XSLT C library for GNOME. While it was developed as part of the GNOME
       project, it can operate independently of the GNOME desktop.

       **xsltproc** is invoked from the command line with the name of the stylesheet to be used followed
       by the name of the file or files to which the stylesheet is to be applied. It will use the
       standard input if a filename provided is **-** .

       If a stylesheet is included in an XML document with a Stylesheet Processing Instruction, no
       stylesheet need to be named at the command line.  **xsltproc** will automatically detect the
       included stylesheet and use it.

       By default, output is to stdout. You can specify a file for output using the **-o** or **--output**
       option.

## OPTIONS
       **xsltproc** accepts the following options (in alphabetical order):

### --catalogs
           Use the SGML catalog specified in **SGML**___**CATALOG**___**FILES** to resolve the location of external
           entities. By default, **xsltproc** looks for the catalog specified in **XML**___**CATALOG**___**FILES**. If
           that is not specified, it uses /etc/xml/catalog.

### --debug
           Output an XML tree of the transformed document for debugging purposes.

### --dumpextensions
           Dumps the list of all registered extensions on stdout.

### --html
           The input document is an HTML file.

### --load-trace
           Display all the documents loaded during the processing to stderr.

       **--maxdepth** _VALUE_
           Adjust the maximum depth of the template stack before [**libxslt**(3)](https://www.chedong.com/phpMan.php/man/libxslt/3/markdown) concludes it is in an
           infinite loop. The default is 3000.

### --nodtdattr
           Do not apply default attributes from the document's DTD.

### --nomkdir
           Refuses to create directories.

### --nonet
           Do not use the Internet to fetch DTDs, entities or documents.

### --noout
           Do not output the result.

### --novalid
           Skip loading the document's DTD.

### --nowrite
           Refuses to write to any file or resource.

### -o --output
           Direct output to the given _FILE_. Using the option with a _DIRECTORY_ directs the output
           files to the specified directory. This can be useful for multiple outputs (also known as
           "chunking") or manpage processing.

               **Important**
               The given directory **must** already exist.

               **Note**
               Make sure that _FILE_ and _DIRECTORY_ follow the “URI reference computation” as described
               in RFC 2396 and laters. This means, that e.g.  **-o** **directory** will maybe not work, but
               **-o** **directory/** will.

       **--encoding** _ENCODING_
           Allow to specify the encoding for the input.

       **--param** _PARAMNAME_ _PARAMVALUE_
           Pass a parameter of name _PARAMNAME_ and value _PARAMVALUE_ to the stylesheet. You may pass
           multiple name/value pairs up to a maximum of 32. If the value being passed is a string,
           you can use **--stringparam** instead, to avoid additional quote characters that appear in
           string expressions. Note: the XPath expression must be UTF-8 encoded.

       **--path** **"**_PATH(S)_**"**
           Use the (space- or colon-separated) list of filesystem paths specified by _PATHS_ to load
           DTDs, entities or documents. Enclose space-separated lists by quotation marks.

       **--profile** or **--norman**
           Output profiling information detailing the amount of time spent in each part of the
           stylesheet. This is useful in optimizing stylesheet performance.

### --repeat
           Run the transformation 20 times. Used for timing tests.

       **--stringparam** _PARAMNAME_ _PARAMVALUE_
           Pass a parameter of name _PARAMNAME_ and value _PARAMVALUE_ where _PARAMVALUE_ is a string
           rather than a node identifier.  **Note:** The string must be UTF-8 encoded.

### --timing
           Display the time used for parsing the stylesheet, parsing the document and applying the
           stylesheet and saving the result. Displayed in milliseconds.

### -v --verbose
           Output each step taken by **xsltproc** in processing the stylesheet and the document.

### -V --version
           Show the version of [**libxml**(3)](https://www.chedong.com/phpMan.php/man/libxml/3/markdown) and [**libxslt**(3)](https://www.chedong.com/phpMan.php/man/libxslt/3/markdown) used.

       **--writesubtree** _PATH_
           Allow file write only within the _PATH_ subtree.

### --xinclude
           Process the input document using the XInclude specification. More details on this can be
           found in the XInclude specification: **<http://www.w3.org/TR/xinclude/>**

## ENVIRONMENT
       **SGML**___**CATALOG**___**FILES**
           SGML catalog behavior can be changed by redirecting queries to the user's own set of
           catalogs. This can be done by setting the **SGML**___**CATALOG**___**FILES** environment variable to a
           list of catalogs. An empty one should deactivate loading the default /etc/sgml/catalog
           catalog.

       **XML**___**CATALOG**___**FILES**
           XML catalog behavior can be changed by redirecting queries to the user's own set of
           catalogs. This can be done by setting the **XML**___**CATALOG**___**FILES** environment variable to a
           list of catalogs. An empty one should deactivate loading the default /etc/xml/catalog
           catalog.

## DIAGNOSTICS
       **xsltproc** return codes provide information that can be used when calling it from scripts.

       **0**
           No error (normal operation)

       **1**
           No argument

       **2**
           Too many parameters

       **3**
           Unknown option

       **4**
           Failed to parse the stylesheet

       **5**
           Error in the stylesheet

       **6**
           Error in one of the documents

       **7**
           Unsupported xsl:output method

       **8**
           String parameter contains both quote and double-quotes

       **9**
           Internal processing error

       **10**
           Processing was stopped by a terminating message

       **11**
           Could not write the result to the output file

## SEE ALSO
       [**libxml**(3)](https://www.chedong.com/phpMan.php/man/libxml/3/markdown), [**libxslt**(3)](https://www.chedong.com/phpMan.php/man/libxslt/3/markdown)

       More information can be found at

       •   [**libxml**(3)](https://www.chedong.com/phpMan.php/man/libxml/3/markdown) web page **<http://www.xmlsoft.org/>**

       •   W3C XSLT page **<http://www.w3.org/TR/xslt>**


## AUTHOR
       **John** **Fleck** <<jfleck@inkstain.net>>
           Author.

## COPYRIGHT
       Copyright © 2001, 2002



libxslt                                        $Date$                                    [XSLTPROC(1)](https://www.chedong.com/phpMan.php/man/XSLTPROC/1/markdown)
