generate Expand/Collapse All Print this Topic Previous Page Up One Level Next page

Home >  StyleVision Server Command Line >


The generate command (short form is gen) takes:


an input XML file as a mandatory option
an input PXF file as the command's argument; PXF files are created with Altova's StyleVision applicationn.
at least one output-creation option


The command 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.


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 StyleVisionServer2019 folder. Note that Apache FOP requires Java Runtime Environment 1.6 or later to 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 generate | gen --inputxml=Filename [additional options] InputPXF


Click to expand/collapseCasing and slashes on the command line

StyleVisionServer on Windows

stylevisionserver on 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.






Path to the PXF file which contains the XSLT document/s that will be used to generate the output document/s.




-- xml, --inputxml


Mandatory option

The XML file to process. This option is mandatory. The XML file can be located inside or outside the PXF file. To target XML files inside a PXF file, see the highlighted parts in the examples below. The --inputxml option is ignored if the main schema source of the input PXF is a DB or DB-XML.

--dbw, --dbwhere

A WHERE clause that determines what rows of a DB-XML source to process. Form: --dbwhere=WHEREClause

--p, --param

Assigns a value to a parameter defined in the PXF file. Form: --param=$ParamName:ParamValue. The --param switch must be used before each parameter. Use quotes if ParamName or ParamValue contains a space.

For example: --p=$company:"Nanonull Inc"


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

The output HTML file to create. Form: --outhtml=Filename

--pdf, --outpdf

The output PDF file to create. Form: --outpdf=Filename

--rtf, --outrtf

The output RTF file to create. Form: --outrtf=Filename

--docx, --outdocx

The output DOCX file to create. Form: --outdocx=Filename

--fo, --outfo

The FO file to create. Form: --outfo=Filename


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.

--v, --verbose

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

The language used for displaying messages. Form: --lang=languagecode. Languages supported on installation: en, de, fr, es, ja

--h, --help

Displays information about the command


Note:If the output-creation options ( --html , --pdf, --rtf, --docx, --fo) are given as a relative path, the output file's location will be relative to the folder in which the PXF file is.


Options are listed in their short forms (if available) and long forms. You can use one or two dashes for both short and long forms. An option that takes a value is written like this: --option=value.


Note:On Windows systems: Avoid using the end backslash and closing quote on the command line \", for example, as in: "C:\My directory\". These two characters are interpreted by the command line parser as a literal double-quotation mark. Use the double backslash \\ if spaces occur in the command line and you need the quotes (for example: "C:\My Directory\\"). Alternatively, try to avoid using spaces and, therefore, quotes at all.



Example of the generate command:


stylevisionserver generate --inputxml=altova:\\packagedfile\ExpReport.xml --html=Test.html ExpReport.pxf

stylevisionserver generate --inputxml=C:\ExpReport.pxf|zip\ExpReport.xml --html=Test.html ExpReport.pxf

stylevisionserver generate --inputxml=ExternalXML.xml --html=Test.html Test.pxf


The command above contains the mandatory --inputxml option, the InputPXF argument (Test.pxf), and a minimum of one output-creation option (--html). The input XML file to use can be located inside the PXF file (see first and second examples above) or it can be an external XML file (located outside the PXF file; see third example 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 example above, the output file's location will be relative to the folder in which the PXF file is.


© 2019 Altova GmbH