pc:apply2file

Previous Next

Applies an XSLT transformation to a specified XML document and writes the result to a file on the file system.

Syntax

<pc:apply2file
     xml = "expr >> path
     xsl = "expr >> path
     filepath = "expr >> path"
     variable "value"
   [ variable = "value" ... ]  />

The required xml, xsl, and filepath are filepaths identifying (respectively) the input XML file, the XSLT stylesheet, and the result file.

Optional variable-value pairs may be passed as input parameters to the XSLT stylesheet corresponding to <xsl:param> entries within the stylesheet.

xml, xsl and filepath must be absolute filepaths or filepaths relative to the location of the script file. The example illustrates the latter.

 

Example

<pc:apply2file
    xml="../../env.xml" 
    xsl="using/env.xsl" 
    filepath="env.xml"
    servername="{$servername}" />

 

See also

pc:apply