Forrest logo
back to the xsltproc tool

xsltproc:tldr:5f581

xsltproc: 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}
try on your machine

This command is using the xsltproc tool, which is a command-line tool for applying XSLT stylesheets to XML documents. Here is the breakdown of the command:

  • xsltproc: This is the command used to invoke the xsltproc tool.
  • --output ${path-to-output_file-html}: This option specifies the path and filename for the output file to be created. In this case, the output file will be in HTML format.
  • --stringparam "${name}" "${value}": This option is used to pass a string parameter to the XSLT stylesheet. ${name} and ${value} are placeholders for the actual parameter name and value that you want to pass.
  • ${path-to-stylesheet_file-xslt}: This is the path and filename of the XSLT stylesheet file that will be applied to the XML document.
  • ${path-to-xml_file-xml}: This is the path and filename of the XML file that will be transformed using the XSLT stylesheet.

Overall, this command runs the xsltproc tool, specifies the output file path and filename, passes a string parameter to the XSLT stylesheet, and provides the paths and filenames of the XSLT stylesheet and XML document to be transformed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the xsltproc tool