The structure of the XSLT style

The root element xsl: transform or xsl: stylesheet encloses the whole XSLT style and NS specifies the prefix for the XSLT elements.

The root element is:

  • Parameter declarations (and their implicit value) - elt. xsl:param.

  • Parameters can be set when calling XSLT processor - eg java-o net.sf.saxon.Transform outfile.xml infile.xml style.xsl-Dparam = paramvalueVariables

  • Variables declarations - elt. xsl:variable - de facto same as parameters but not settable from outside.

  • It should be noted that the XSLT (without processor-specific extension) is a pure functional language, i.e. a template application does not have side effect -> variables can be assigned once, then just read!