Reconnaissance

Version 6.2 by Nicolas Gregoire on 2012/01/14 17:34

XSLT standards define several properties about the XSLT engine itself. Querying for these properties allows to easily identify the engine.

XSLT 1.0

The function system-property() supports by default the following properties :

  • xsl:version : a number giving the version of XSLT implemented by the processor
  • xsl:vendor : a string identifying the vendor of the XSLT processor
  • xsl:vendor-url : a URL identifying the vendor of the XSLT processor (typically its Web site)

The attached stylesheet recon-xslt10.xsl fingerprints a XSLT 1.0 engine.

XSLT 2.0

This version supports some additional properties :

  • xsl:product-name : a string containing the name of the implementation, as defined by the implementer
  • xsl:product-version : a string identifying the version of the implementation, as defined by the implementer
  • xsl:is-schema-aware : returns "yes" if the XSLT processor is schema-aware, or "no" otherwise
  • xsl:supports-serialization : returns "yes" if the XSLT processor offers this feature, or "no" otherwise
  • xsl:supports-backwards-compatibility : returns "yes" if the XSLT processor offers this feature, or "no" otherwise

  The attached stylesheet recon-xslt20.xsl fingerprints a XSLT 2.0 engine.

Supported features

The XSLT standards define two additional functions used to enumerate the available features :

  • function-available()
  • element-available()

This stylesheet uses these functions to test the availability of :

  • XSLT and XPath functions
  • XSLT elements
  • Saxon extensions
  • EXSLT extensions

TODO : include my own example !