Skip to content

XSLT system-property() Function

How to use the XSLT system-property() function to retrieve processor details like version, vendor, and vendor URL in your stylesheets.

XSLT system-property() Function

The system-property function returns the value of the system property specified by the name.

System properties in the XSLT namespace are:

  • xsl:version : the version of XSLT implemented by the processor
  • xsl:vendor: the vendor of the XSLT processor
  • xsl:vendor-url: the URL identifying the vendor of the XSLT processor

Syntax

object system-property(string)

Input Parameters

Parameter Required/Optional Description
string Required Specifies the system property to return the value of

Example

Consider the following example about a bookstore:

example.xslxml
<?xml version="1.0"  encoding="UTF-8"?>  
<xsl:stylesheet version="1.0"  
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  
  
<xsl:template match="/">  
	<html>  
		<body>  
			<p>  
			Version:  
			<xsl:value-of select="system-property('xsl:version')"  />  
			<br />  
			Vendor:  
			<xsl:value-of select="system-property('xsl:vendor')"  />  
			<br />  
			Vendor URL:  
			<xsl:value-of select="system-property('xsl:vendor-url')"  />  
			</p>  
		</body>  
	</html>  
</xsl:template>  
  
</xsl:stylesheet>

And the output is:

<html>  
	<body>  
		<p> Version: 1.0<br/>
		Vendor: libxslt<br/>
		Vendor URL: http://xmlsoft.org/XSLT/</p>  
	</body>  
</html>
Navigation