{
    "content": [
        {
            "type": "text",
            "text": "# xsltproc(1) (man)\n\n## TLDR\n\n> Transform XML with XSLT to produce output (usually HTML or XML).\n\n- Transform an XML file with a specific XSLT stylesheet:\n  `xsltproc --output {{path/to/output_file.html}} {{path/to/stylesheet_file.xslt}} {{path/to/file.xml}}`\n- Pass a value to a parameter in the stylesheet:\n  `xsltproc --output {{path/to/output_file.html}} --stringparam \"{{name}}\" \"{{value}}\" {{path/to/stylesheet_file.xslt}} {{path/to/xml_file.xml}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** xsltproc - command line XSLT processor\n\n**Synopsis:** xsltproc [[-V | --version] [-v | --verbose] [{-o | --output} {FILE | DIRECTORY}] | --timing |\n--repeat | --debug | --novalid | --noout | --maxdepth VALUE | --html |\n--encoding ENCODING  | --param PARAMNAME PARAMVALUE  |\n--stringparam PARAMNAME PARAMVALUE  | --nonet | --path \"PATH(S)\" | --load-trace |\n--catalogs | --xinclude | [--profile | --norman] | --dumpextensions | --nowrite |\n--nomkdir | --writesubtree PATH | --nodtdattr] [STYLESHEET] {XML-FILE... | -}\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --catalogs | — | Use the SGML catalog specified in SGMLCATALOGFILES to resolve the location of external entities. By default, xsltproc lo |\n| — | --debug | — | Output an XML tree of the transformed document for debugging purposes. |\n| — | --dumpextensions | — | Dumps the list of all registered extensions on stdout. |\n| — | --html | — | The input document is an HTML file. |\n| — | --load-trace | — | Display all the documents loaded during the processing to stderr. --maxdepth VALUE Adjust the maximum depth of the templ |\n| — | --nodtdattr | — | Do not apply default attributes from the document's DTD. |\n| — | --nomkdir | — | Refuses to create directories. |\n| — | --nonet | — | Do not use the Internet to fetch DTDs, entities or documents. |\n| — | --noout | — | Do not output the result. |\n| — | --novalid | — | Skip loading the document's DTD. |\n| — | --nowrite | — | Refuses to write to any file or resource. |\n| -o | --output | — | Direct output to the given FILE. Using the option with a DIRECTORY directs the output files to the specified directory.  |\n| — | --repeat | — | Run the transformation 20 times. Used for timing tests. --stringparam PARAMNAME PARAMVALUE Pass a parameter of name PARA |\n| — | --timing | — | Display the time used for parsing the stylesheet, parsing the document and applying the stylesheet and saving the result |\n| -v | --verbose | — | Output each step taken by xsltproc in processing the stylesheet and the document. |\n| -V | --version | — | Show the version of libxml(3) and libxslt(3) used. --writesubtree PATH Allow file write only within the PATH subtree. |\n| — | --xinclude | — | Process the input document using the XInclude specification. More details on this can be found in the XInclude specifica |\n\n## See Also\n\n- libxml(3)\n- libxslt(3)\n- libxml(3)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (7 lines)\n- **DESCRIPTION** (15 lines)\n- **OPTIONS** (2 lines) — 17 subsections\n  - --catalogs (4 lines)\n  - --debug (2 lines)\n  - --dumpextensions (2 lines)\n  - --html (2 lines)\n  - --load-trace (6 lines)\n  - --nodtdattr (2 lines)\n  - --nomkdir (2 lines)\n  - --nonet (2 lines)\n  - --noout (2 lines)\n  - --novalid (2 lines)\n  - --nowrite (2 lines)\n  - -o --output (29 lines)\n  - --repeat (6 lines)\n  - --timing (3 lines)\n  - -v --verbose (2 lines)\n  - -V --version (5 lines)\n  - --xinclude (3 lines)\n- **ENVIRONMENT** (12 lines)\n- **DIAGNOSTICS** (38 lines)\n- **SEE ALSO** (9 lines)\n- **AUTHOR** (3 lines)\n- **COPYRIGHT** (5 lines)\n\n## Full Content\n\n### NAME\n\nxsltproc - command line XSLT processor\n\n### SYNOPSIS\n\nxsltproc [[-V | --version] [-v | --verbose] [{-o | --output} {FILE | DIRECTORY}] | --timing |\n--repeat | --debug | --novalid | --noout | --maxdepth VALUE | --html |\n--encoding ENCODING  | --param PARAMNAME PARAMVALUE  |\n--stringparam PARAMNAME PARAMVALUE  | --nonet | --path \"PATH(S)\" | --load-trace |\n--catalogs | --xinclude | [--profile | --norman] | --dumpextensions | --nowrite |\n--nomkdir | --writesubtree PATH | --nodtdattr] [STYLESHEET] {XML-FILE... | -}\n\n### DESCRIPTION\n\nxsltproc is a command line tool for applying XSLT stylesheets to XML documents. It is part of\nlibxslt(3), the XSLT C library for GNOME. While it was developed as part of the GNOME\nproject, it can operate independently of the GNOME desktop.\n\nxsltproc is invoked from the command line with the name of the stylesheet to be used followed\nby the name of the file or files to which the stylesheet is to be applied. It will use the\nstandard input if a filename provided is - .\n\nIf a stylesheet is included in an XML document with a Stylesheet Processing Instruction, no\nstylesheet need to be named at the command line.  xsltproc will automatically detect the\nincluded stylesheet and use it.\n\nBy default, output is to stdout. You can specify a file for output using the -o or --output\noption.\n\n### OPTIONS\n\nxsltproc accepts the following options (in alphabetical order):\n\n#### --catalogs\n\nUse the SGML catalog specified in SGMLCATALOGFILES to resolve the location of external\nentities. By default, xsltproc looks for the catalog specified in XMLCATALOGFILES. If\nthat is not specified, it uses /etc/xml/catalog.\n\n#### --debug\n\nOutput an XML tree of the transformed document for debugging purposes.\n\n#### --dumpextensions\n\nDumps the list of all registered extensions on stdout.\n\n#### --html\n\nThe input document is an HTML file.\n\n#### --load-trace\n\nDisplay all the documents loaded during the processing to stderr.\n\n--maxdepth VALUE\nAdjust the maximum depth of the template stack before libxslt(3) concludes it is in an\ninfinite loop. The default is 3000.\n\n#### --nodtdattr\n\nDo not apply default attributes from the document's DTD.\n\n#### --nomkdir\n\nRefuses to create directories.\n\n#### --nonet\n\nDo not use the Internet to fetch DTDs, entities or documents.\n\n#### --noout\n\nDo not output the result.\n\n#### --novalid\n\nSkip loading the document's DTD.\n\n#### --nowrite\n\nRefuses to write to any file or resource.\n\n#### -o --output\n\nDirect output to the given FILE. Using the option with a DIRECTORY directs the output\nfiles to the specified directory. This can be useful for multiple outputs (also known as\n\"chunking\") or manpage processing.\n\nImportant\nThe given directory must already exist.\n\nNote\nMake sure that FILE and DIRECTORY follow the “URI reference computation” as described\nin RFC 2396 and laters. This means, that e.g.  -o directory will maybe not work, but\n-o directory/ will.\n\n--encoding ENCODING\nAllow to specify the encoding for the input.\n\n--param PARAMNAME PARAMVALUE\nPass a parameter of name PARAMNAME and value PARAMVALUE to the stylesheet. You may pass\nmultiple name/value pairs up to a maximum of 32. If the value being passed is a string,\nyou can use --stringparam instead, to avoid additional quote characters that appear in\nstring expressions. Note: the XPath expression must be UTF-8 encoded.\n\n--path \"PATH(S)\"\nUse the (space- or colon-separated) list of filesystem paths specified by PATHS to load\nDTDs, entities or documents. Enclose space-separated lists by quotation marks.\n\n--profile or --norman\nOutput profiling information detailing the amount of time spent in each part of the\nstylesheet. This is useful in optimizing stylesheet performance.\n\n#### --repeat\n\nRun the transformation 20 times. Used for timing tests.\n\n--stringparam PARAMNAME PARAMVALUE\nPass a parameter of name PARAMNAME and value PARAMVALUE where PARAMVALUE is a string\nrather than a node identifier.  Note: The string must be UTF-8 encoded.\n\n#### --timing\n\nDisplay the time used for parsing the stylesheet, parsing the document and applying the\nstylesheet and saving the result. Displayed in milliseconds.\n\n#### -v --verbose\n\nOutput each step taken by xsltproc in processing the stylesheet and the document.\n\n#### -V --version\n\nShow the version of libxml(3) and libxslt(3) used.\n\n--writesubtree PATH\nAllow file write only within the PATH subtree.\n\n#### --xinclude\n\nProcess the input document using the XInclude specification. More details on this can be\nfound in the XInclude specification: http://www.w3.org/TR/xinclude/\n\n### ENVIRONMENT\n\nSGMLCATALOGFILES\nSGML catalog behavior can be changed by redirecting queries to the user's own set of\ncatalogs. This can be done by setting the SGMLCATALOGFILES environment variable to a\nlist of catalogs. An empty one should deactivate loading the default /etc/sgml/catalog\ncatalog.\n\nXMLCATALOGFILES\nXML catalog behavior can be changed by redirecting queries to the user's own set of\ncatalogs. This can be done by setting the XMLCATALOGFILES environment variable to a\nlist of catalogs. An empty one should deactivate loading the default /etc/xml/catalog\ncatalog.\n\n### DIAGNOSTICS\n\nxsltproc return codes provide information that can be used when calling it from scripts.\n\n0\nNo error (normal operation)\n\n1\nNo argument\n\n2\nToo many parameters\n\n3\nUnknown option\n\n4\nFailed to parse the stylesheet\n\n5\nError in the stylesheet\n\n6\nError in one of the documents\n\n7\nUnsupported xsl:output method\n\n8\nString parameter contains both quote and double-quotes\n\n9\nInternal processing error\n\n10\nProcessing was stopped by a terminating message\n\n11\nCould not write the result to the output file\n\n### SEE ALSO\n\nlibxml(3), libxslt(3)\n\nMore information can be found at\n\n•   libxml(3) web page http://www.xmlsoft.org/\n\n•   W3C XSLT page http://www.w3.org/TR/xslt\n\n### AUTHOR\n\nJohn Fleck <jfleck@inkstain.net>\nAuthor.\n\n### COPYRIGHT\n\nCopyright © 2001, 2002\n\n\n\nlibxslt                                        $Date$                                    XSLTPROC(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xsltproc",
        "section": "1",
        "mode": "man",
        "summary": "xsltproc - command line XSLT processor",
        "synopsis": "xsltproc [[-V | --version] [-v | --verbose] [{-o | --output} {FILE | DIRECTORY}] | --timing |\n--repeat | --debug | --novalid | --noout | --maxdepth VALUE | --html |\n--encoding ENCODING  | --param PARAMNAME PARAMVALUE  |\n--stringparam PARAMNAME PARAMVALUE  | --nonet | --path \"PATH(S)\" | --load-trace |\n--catalogs | --xinclude | [--profile | --norman] | --dumpextensions | --nowrite |\n--nomkdir | --writesubtree PATH | --nodtdattr] [STYLESHEET] {XML-FILE... | -}",
        "tldr_summary": "Transform XML with XSLT to produce output (usually HTML or XML).",
        "tldr_examples": [
            {
                "description": "Transform an XML file with a specific XSLT stylesheet",
                "command": "xsltproc --output {{path/to/output_file.html}} {{path/to/stylesheet_file.xslt}} {{path/to/file.xml}}"
            },
            {
                "description": "Pass a value to a parameter in the stylesheet",
                "command": "xsltproc --output {{path/to/output_file.html}} --stringparam \"{{name}}\" \"{{value}}\" {{path/to/stylesheet_file.xslt}} {{path/to/xml_file.xml}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--catalogs",
                "arg": null,
                "description": "Use the SGML catalog specified in SGMLCATALOGFILES to resolve the location of external entities. By default, xsltproc looks for the catalog specified in XMLCATALOGFILES. If that is not specified, it uses /etc/xml/catalog."
            },
            {
                "flag": "",
                "long": "--debug",
                "arg": null,
                "description": "Output an XML tree of the transformed document for debugging purposes."
            },
            {
                "flag": "",
                "long": "--dumpextensions",
                "arg": null,
                "description": "Dumps the list of all registered extensions on stdout."
            },
            {
                "flag": "",
                "long": "--html",
                "arg": null,
                "description": "The input document is an HTML file."
            },
            {
                "flag": "",
                "long": "--load-trace",
                "arg": null,
                "description": "Display all the documents loaded during the processing to stderr. --maxdepth VALUE Adjust the maximum depth of the template stack before libxslt(3) concludes it is in an infinite loop. The default is 3000."
            },
            {
                "flag": "",
                "long": "--nodtdattr",
                "arg": null,
                "description": "Do not apply default attributes from the document's DTD."
            },
            {
                "flag": "",
                "long": "--nomkdir",
                "arg": null,
                "description": "Refuses to create directories."
            },
            {
                "flag": "",
                "long": "--nonet",
                "arg": null,
                "description": "Do not use the Internet to fetch DTDs, entities or documents."
            },
            {
                "flag": "",
                "long": "--noout",
                "arg": null,
                "description": "Do not output the result."
            },
            {
                "flag": "",
                "long": "--novalid",
                "arg": null,
                "description": "Skip loading the document's DTD."
            },
            {
                "flag": "",
                "long": "--nowrite",
                "arg": null,
                "description": "Refuses to write to any file or resource."
            },
            {
                "flag": "-o",
                "long": "--output",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--repeat",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--timing",
                "arg": null,
                "description": "Display the time used for parsing the stylesheet, parsing the document and applying the stylesheet and saving the result. Displayed in milliseconds."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Output each step taken by xsltproc in processing the stylesheet and the document."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Show the version of libxml(3) and libxslt(3) used. --writesubtree PATH Allow file write only within the PATH subtree."
            },
            {
                "flag": "",
                "long": "--xinclude",
                "arg": null,
                "description": "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/"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "libxml",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/libxml/3/json"
            },
            {
                "name": "libxslt",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/libxslt/3/json"
            },
            {
                "name": "libxml",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/libxml/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "--catalogs",
                        "lines": 4,
                        "long": "--catalogs"
                    },
                    {
                        "name": "--debug",
                        "lines": 2,
                        "long": "--debug"
                    },
                    {
                        "name": "--dumpextensions",
                        "lines": 2,
                        "long": "--dumpextensions"
                    },
                    {
                        "name": "--html",
                        "lines": 2,
                        "long": "--html"
                    },
                    {
                        "name": "--load-trace",
                        "lines": 6,
                        "long": "--load-trace"
                    },
                    {
                        "name": "--nodtdattr",
                        "lines": 2,
                        "long": "--nodtdattr"
                    },
                    {
                        "name": "--nomkdir",
                        "lines": 2,
                        "long": "--nomkdir"
                    },
                    {
                        "name": "--nonet",
                        "lines": 2,
                        "long": "--nonet"
                    },
                    {
                        "name": "--noout",
                        "lines": 2,
                        "long": "--noout"
                    },
                    {
                        "name": "--novalid",
                        "lines": 2,
                        "long": "--novalid"
                    },
                    {
                        "name": "--nowrite",
                        "lines": 2,
                        "long": "--nowrite"
                    },
                    {
                        "name": "-o --output",
                        "lines": 29,
                        "flag": "-o",
                        "long": "--output"
                    },
                    {
                        "name": "--repeat",
                        "lines": 6,
                        "long": "--repeat"
                    },
                    {
                        "name": "--timing",
                        "lines": 3,
                        "long": "--timing"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 5,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "--xinclude",
                        "lines": 3,
                        "long": "--xinclude"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}