xml spy
Previous  Top  Next

StyleVisionBatch Syntax


The syntax for the command line interface utility StyleVisionBatch is:

 

       StyleVisionBatch [<Stylevision exe>] [<options>]

 

where

 

StyleVisionBatchis the CLI utility, which is located in the StyleVision application folder        
<Stylevision exe>is the StyleVision executable file; it needs to be specified only if the StyleVision executable is not named stylevision.exe or is not located in the same folder as StyleVisionBatch.exe. If specified, the name must end in .exe.
<options>One or more of the options listed below.

 

 

StyleVisionBatch options

StyleVisionBatch options may be entered in any order. In the listing below they are organized into groups so as to provide a better overview.

 

Utility

 

-help or -?

Displays syntax at the command line

-verbose or -v

Displays processing information at runtime

-FOPBatFile=<file>

Sets FOP processor batch file

 

 

SPS and Parameters

 

<stylesheet>

Sets SPS (.sps) stylesheet

$<paramname>=<value>

Assigns a value to a parameter declared in the XSLT stylesheet. If the value contains a space, enclose the value in double quotes. For example: $paramname="A value". Multiple parameters are separated by  spaces.

 

 

XSLT file output

 

-OutXSLT=<file>

Writes XSLT-for-HTML to the specified file

-OutXSLRTF=<file>

Writes XSLT-for-RTF to the specified file

-OutXSLFO=<file>

Writes XSLT-for-FO to the specified file

-OutXSLWord2007=<file>

Writes XSLT-for-Word 2007 to the specified file

 

 

Input files

 

-InpXML=<file>

Sets input XML file

-InpXSLT=<file>

Sets input XSLT-for-HTML file

-InpXSLRTF=<file>

Sets input XSLT-for-RTF file

-InpXSLFO=<file>

Sets input XSLT-for-FO file

-InpXSLWord2007=<file>

Sets input XSLT-for-Word 2007 file

 

 

Output files

 

-OutHTML=<file>

Writes HTML output to the specified file

-OutRTF=<file>

Writes RTF output to the specified file

-OutFO=<file>

Writes FO output to the specified file

-OutPDF=<file>

Writes PDF output to the specified file

-OutWord2007=<file>

Writes Word 2007 output to the specified file

 

 

 

DB data output

 

-OutDBXML=<file>

Writes XML generated from DB to the specified file. For DB XML databases, the schema source may optionally be specified with the -DBWhere flag.

-OutDBSchema=<file>

Writes XML Schema generated from DB to the specified file. For DB XML databases, the schema source may optionally be specified with the -DBWhere flag.

 

 

 

Additional flag for XML DBs

 

-DBWhere:<param>=<cond>

Specifies the cell in the XML DB to output. The optional parameter <param> identifies the DB cell schema source, and <cond> is a simple SQL WHERE clause that identifies the particular cell/s to be output. If no parameter is specified, the schema source of the SPS is used. Also see note below and the Examples section.

 

 

 

 

Explanatory points

The following points provide supplementary information about StyleVisionBatch syntax and the command line process.

 

When StyleVisionBatch is called, it looks in the current directory for StyleVision.exe. If your StyleVision executable is named otherwise or located in another folder, use the <Stylevision exe> argument to specify the executable.
Paths may be absolute or relative and should use backslashes.
Options are prefixed either with a minus sign (for example: -OutHTML) or a forward slash (for example: /OutHTML).
If the filename or the path to it contains a space, then the entire path should be enclosed in quotes. For example: "c:\My Files\MyXML.xml" or "c:\MyFiles\My XML.xml".
Commands, paths, and folder and file names are case-insensitive.
If the SPS file is specified, the Working XML File associated with it and the XSLT stylesheet generated from it will be used to generate output; therefore no input XML or XSLT file is required. If, however, the SPS file is not specified, an input XML file and input XSLT file must be specified as options. An input XML File must also be specified if the SPS file does not have a Working XML File assigned to it. For output from a DB, the SPS must be specified.
Parameter declarations refer to parameters in the XSLT stylesheet. Parameter names and values are case-sensitive. If the SPS is DB-based and has a DB Filter which uses parameters, the XML generated from the DB will be appropriately filtered, using parameter values you specify at the command line. Each parameter declaration on the command line must be prefixed with a $, and, if multiple parameters are used, they must be separated from each other with a space. If the value of the parameter contains a space, then the value must be enclosed in double quotes.
No default output is specified, so you must specify the required output. For example: OutHTML=Test.html.
If you specify only the output file (no XML file or XSLT file), the Working XML File or DB specified in the SPS is used for the source XML, and the required XSLT is generated from the SPS.
Any temporary files that are created are deleted at the end of the processing.
For transformations to PDF using FOP, the  -FOPBatFile option must be specified.
To generate PDF from an FO (.fo) file, call the FO processor directly from the command line; there is no need to use StyleVision for this.
The -verbose option provides a detailed report of all steps carried out during the processing of the command.
When specifying HTML and RTF output, make sure that the generated file is placed in a location in which relative paths to images, etc, will point correctly to their targets. The same applies to hyperlinks.
When the -DBWhere flag is used (-DBWhere:[<param>]=<cond>), the parameter <param> identifies the schema source of the DB cell. For example, if the parameter is $DBXMLFIELD, then the schema source will be known to the SPS because the parameter, in the SPS,  would be keyed to a particular schema. The value of <cond> is an SQL WHERE clause which determines the cell/s to be used. It is typically of the form "COLNAME = ROWNUM", where COLNAME is the name of the column containing the XML data cell and ROWNUM specifies the row/s in the column, and, by extension, the cell/s in the column. See examples in the next section. If no parameter is specified, then, in the case of single-schema-source SPSs, the schema source of the SPS is used.
When the -DBWhere flag is used and more than one row (or cell) is specified, then if the DB cell schema is the main schema in the SPS and the specified command (-OutHTML, -OutRTF, -OutFO, or -OutPDF) requires input from the DBCell, then the command is executed once for each cell and each cell is output in a separate file. However, if the DB cell schema is a secondary schema in the SPS, the command is applied to only the first row (cell). See examples in the next section.

 

 


See also:

 

 


 

 


Previous  Top  Next

© 2008 Altova