Difference between revisions of "XSLT Module"
Jump to navigation
Jump to search
| Line 17: | Line 17: | ||
|- | |- | ||
| valign='top' width='90' | '''Signatures''' | | valign='top' width='90' | '''Signatures''' | ||
| − | |<code><b>$xslt: | + | |<code><b>$xslt:version</b> as xs:string</code><br /> |
|- | |- | ||
| valign='top' | '''Summary''' | | valign='top' | '''Summary''' | ||
| Line 30: | Line 30: | ||
|- | |- | ||
| valign='top' | '''Summary''' | | valign='top' | '''Summary''' | ||
| − | |Transforms the specified data specified by <code>$input</code>, using the XSLT stylesheet specified by <code>$stylesheet</code>, and returns the result as <code>node()</code>. If Saxon is found in the Java classpath, <code>XSLT 2.0</code> is used. Otherwise, Java’s internal <code>XSLT 1.0</code> is used to perform the transformation.<br /> | + | |Transforms the specified data specified by <code>$input</code>, using the XSLT stylesheet specified by <code>$stylesheet</code>, and returns the result as <code>node()</code>.Both <code>$input</code> and <code>$stylesheet</code> may either be an <code>xs:string<code> containing the path to the document or an XML string, or a <code>node()</code> containing the actual document or stylesheet.<br />If Saxon is found in the Java classpath, <code>XSLT 2.0</code> is used. Otherwise, Java’s internal <code>XSLT 1.0</code> is used to perform the transformation.<br /> |
|} | |} | ||
[[Category:XQuery]] | [[Category:XQuery]] | ||
Revision as of 12:46, 10 July 2011
This module contains XQuery functions and variables to perform XSLT transformations. All functions are preceded by the xslt: prefix, which is linked to the http://www.basex.org/xslt namespace. By default, this module relies on the internal XSLT 1.0 implementation of Java. If Saxon is found in the classpath, however, XSLT 2.0 is used.
Note that this module has been introduced with Version 6.7.1 of BaseX.
$xslt:processor
| Signatures | $xslt:processor as xs:string |
| Summary | This variable returns the name of the applied XSLT processor (currently: Java or Saxon). |
$xslt:version
| Signatures | $xslt:version as xs:string |
| Summary | This variable returns the supported XSLT version (currently: 1.0 or 2.0). |
xslt:transform
| Signatures | xslt:transform($input as item(), $stylesheet as item()) as node()xslt:transform($input as item(), $stylesheet as item(), $params as item()) as node()
|
| Summary | Transforms the specified data specified by $input, using the XSLT stylesheet specified by $stylesheet, and returns the result as node().Both $input and $stylesheet may either be an xs:string |