XSLT system-property() 函數
定義和用法
system-property() 函數返回通過名稱標識的系統屬性的值。
在XSLT 命名空間中的系統屬性:
- xsl:version - 處理器實現的XSLT 版本
- xsl:vendor - XSLT 處理器的開發商
- xsl:vendor-url - 標識XSLT 處理器的開發商的URL
語法
object system-property(string)
參數
参数 | 描述 |
---|---|
string | 必需。规定返回其值的系统属性。 |
實例1
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<p>
版本:
<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>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<p>
版本:
<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>
完整的XSLT函數參考對象