Syntax and description
The generate command (short form gen) generates one or more output files (HTML, PDF, RTF, and/or DOCX) by transforming the input XML file using the XSLT document/s contained in the input PXF file.
stylevisionserver generate | gen --inputxml=Filename [additional options] InputPXF
•The --inputxml option is mandatory; it gives the path to the XML file.
•The InputPXF argument specifies the path to the PXF file which contains the XSLT document/s that will be used to generate the output document/s. PXF files are created with Altova's StyleVision application.
•Each output format is generated by specifying an option for that output (see Options list below). The value of each option is a path that specifies where the output is to be generated.
|Note:||StyleVision Server uses Apache FOP, the FO processor of the Apache Project, to generate PDF files from FO. Apache FOP is installed with StyleVision Server at the following location: On Windows systems, ProgramData\Altova\SharedBetweenVersions; on Linux and macOS systems, in a descendant folder of the StyleVisionServer2022 folder. Note that Apache FOP requires that Java Runtime Environment 1.6 or later be installed on the StyleVision Server machine. For 32-bit StyleVision Server, install the 32-bit Java; for 64-bit StyleVision Server, install the 64-bit Java.|
StyleVisionServer on Windows
stylevisionserver on Windows and Unix (Linux, Mac)
* Note that lowercase (stylevisionserver) works on all platforms (Windows, Linux, and Mac), while upper-lower (StyleVisionServer) works only on Windows and Mac.
* Use forward slashes on Linux and Mac, backslashes on Windows.
On Windows systems: When spaces or special characters occur in strings (for example in file or folder names, or company, person or product names), use quotes: for example, "My File". Note, however, that a backslash followed by a double-quotation mark (for example, "C:\My directory\") might not be read correctly. This is because the backslash character is also used to indicate the start of an escape sequence, and the escape sequence \" stands for the double-quotation mark character. If you want to escape this sequence of characters, use a preceding backslash, like this: \\". To summarize: If you need to write a file path that contains spaces or an end backslash, write it like this: "C:\My Directory\\".
Examples of the generate command:
stylevisionserver generate --inputxml=C:\MyFiles\ExpReport.xml --html=Test.html ExpReport.pxf
stylevisionserver generate --inputxml=C:\ExpReport.pxf|zip\ExpReport.xml --html=Test.html ExpReport.pxf
stylevisionserver generate --inputxml=altova://packagedfile/ExpReport.xml --html=Test.html ExpReport.pxf
stylevisionserver generate --inputxml=ExternalXML.xml --html=Test.html Test.pxf
•The commands above contain the mandatory --inputxml option, the InputPXF argument (Test.pxf), and a minimum of one output-creation option (--html in all the examples above).
•The input XML file to use can be located inside the PXF file (see second and third examples above) or it can be an external XML file (located outside the PXF file; see first and fourth examples above).
•The --inputxml switch is ignored if the main schema source is DB or DB-XML, but it must be present for syntactical reasons, and you should use something like --inputxml=database.
•If the output-creation option --html takes a relative path, as in the examples above, then the output file's location will be relative to the folder in which the PXF file is.
--xml, --inputxml = PathToXMLFile
This option is mandatory. It specifies the path to the XML file to process. The XML file can be located inside or outside the PXF file. To target XML files inside a PXF file, use the |zip locator (see the highlighted part in the examples above). The --inputxml option is ignored if the main schema source of the input PXF is a DB or DB-XML.
--dbw, --dbwhere = WHEREClause
An SQL WHERE clause that determines what rows of a DB-XML source to process.
--p, --param = \$ParamName:ParamValue
Assigns a value to a parameter defined in the PXF file. The --param switch must be used before each parameter. Use quotes if ParamName or ParamValue contains a space. Example: --p=\$company:"Nanonull Inc"
--prohibit-output-outside-target-folder = true|false
Values are true|false. If true, does not allow the creation of output in any folder other than that in which the main output file (HTML, PDF, RTF, DOCX, FO) is created. This provides protection for other folders if needed. Default is false.
--html, --outhtml = FilePath
Path to the HTML file to generate.
--pdf, --outpdf = FilePath
Path to the PDF file to generate.
--rtf, --outrtf = FilePath
Path to the RTF file to generate.
--docx, --outdocx = FilePath
Path to the DOCX file to generate.
--text, --outtext = FilePath
Path to the Text file to generate.
--fo, --outfo = FilePath
Path to the FO file to generate.
--generate-html-output-as-mime = true|false
Values are true|false. If the option is not specified, default is false, if specified with no value, then true. If true, HTML output is generated as a mime stream.
--taxonomy-package = FilePath
Path to an additional taxonomy package. Add the option multiple times to specify more than one taxonomy package.
--taxonomy-packages-config-file = FilePath
Path to the TaxonomyPackagesConfig.json file, which is a common file used by the Altova products XMLSpy, MapForce, and StyleVision to configure XBRL taxonomies for use across these products.
--v, --verbose = true|false
Values are true|false. Turns the display of all messages, respectively, on or off. Default is false if the option is not provided, true if provided without a value.
--l, --lang = en|de|es|fr|ja
The language used for displaying messages.
Use the --h, --help option to display information about the command.
Options are listed in short form (if available) and long form. You can use one or two dashes for both short and long forms. An option may or may not take a value. If it takes a value, it is written like this: --option=value. Values can be specified without quotes except in two cases: (i) when the value string contains spaces, or (ii) when explicitly stated in the description of the option that quotes are required. If an option takes a Boolean value and no value is specified, then the option's default value is TRUE. Use the --h, --help option to display information about the command.
If you are using the Altova catalog mechanism, you can find the relevant catalog files in the etc folder of the StyleVision Server application folder. For detailed information, see the Catalogs section of the Altova StyleVision manual.