Show last authors
1 {{toc/}}
2
3 = Using XSLT properties =
4
5 XSLT standards define several properties about the XSLT engine itself. Querying for these properties allows to easily identify the engine.
6
7 == XSLT 1.0 ==
8
9 The function [[system-property()>>http://www.w3.org/TR/xslt#function-system-property||rel="__blank"]] supports by default the following properties :
10
11 * xsl:version : a number giving the version of XSLT implemented by the processor
12 * xsl:vendor : a string identifying the vendor of the XSLT processor
13 * xsl:vendor-url : a URL identifying the vendor of the XSLT processor (typically its Web site)
14
15 The attached stylesheet [[recon-xslt10.xsl>>attach:recon-xslt10.xsl]] fingerprints a XSLT 1.0 engine.
16
17 == XSLT 2.0 ==
18
19 This version supports some [[additional>>http://www.w3.org/TR/xslt20/#system-property||rel="__blank"]] properties :
20
21 * xsl:product-name : a string containing the name of the implementation, as defined by the implementer
22 * xsl:product-version : a string identifying the version of the implementation, as defined by the implementer
23 * xsl:is-schema-aware : returns "yes" if the XSLT processor is schema-aware, or "no" otherwise
24 * xsl:supports-serialization : returns "yes" if the XSLT processor offers this feature, or "no" otherwise
25 * xsl:supports-backwards-compatibility : returns "yes" if the XSLT processor offers this feature, or "no" otherwise
26
27 The attached stylesheet [[recon-xslt20.xsl>>attach:recon-xslt20.xsl]] fingerprints a XSLT 2.0 engine.
28
29 = Enumerating supported features =
30
31 == Needed functions ==
32
33 The XSLT standards define two additional functions used to enumerate the available features :
34
35 * function-available()
36 * element-available()
37
38 == Example ==
39
40 This [[stylesheet>>http://www.xmlplease.com/element-function-available.xsl||rel="__blank"]] (by "xmlplease.com") uses these functions to test the availability of :
41
42 * XSLT and XPath functions
43
44 * XSLT elements
45
46 * Saxon extensions
47
48 * EXSLT extensions
49
50 {{warning}}
51 TODO : include my own examples !
52 {{/warning}}
53
54 == Live demo ==
55
56 If you want to identify the XSLT engine used in your browser and its features, please click on [[attach:recon-enumerate-features.xml]].
57
58 {{warning}}
59 This will crash Opera (NULL ptr dereference aka bug DSK-355332) !
60 {{/warning}}

Welcome

Welcome on the XSLT Hacking Encyclopedia !

You may be interested by the Engines and Applications pages.

Link to the blog
Twitter: @Agarri_FR

Tag Cloud

Unknown macro: tagcloud. Click on this message for details.

Content by Nicolas Grégoire / Agarri
Blog - Follow me @Agarri_FR