XSLT system-property() 函数


定义和用法

system-property() 函数返回通过名称标识的系统属性的值。

在 XSLT 命名空间中的系统属性:

系统属性说明
xsl:version

提供处理器所实现的 XSLT 版本的数字;

如果 XSLT 处理器实现本文档所指定的 XSLT 版本,该数字为 1。

xsl:vendorXSLT 处理器的开发商。
xsl:vendor-url标识XSLT 处理器的开发商的 URL。
msxsl:version提供 Microsoft XML 核心服务 (MSXML) 版本的数字。

语法

  1. object system-property(string)
参数
参数描述
string必需。规定返回其值的系统属性。

例子

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4. <xsl:template match="/">
  5. <html>
  6. <body>
  7. <p>
  8. Version:
  9. <xsl:value-of select="system-property('xsl:version')" />
  10. <br />
  11. Vendor:
  12. <xsl:value-of select="system-property('xsl:vendor')" />
  13. <br />
  14. Vendor URL:
  15. <xsl:value-of select="system-property('xsl:vendor-url')" />
  16. </p>
  17. </body>
  18. </html>
  19. </xsl:template>
  20. </xsl:stylesheet>

查看 XSL 文件查看结果

分类导航