Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn:system-property

fn:system-property(
   $property-name as xs:string
) as xs:string

Summary

Returns a string representing the value of the system property identified by the name. If there is no such system property, the zero-length string is returned.

This function is only available in XSLT; it is not available in XQuery.

Parameters
property-name The name of the property whose value is to be returned. Valid names are:
  • xsl:version
  • xsl:vendor
  • xsl:vendor-url
  • xsl:product-name
  • xsl:product-version
  • xsl:is-schema-aware
  • xsl:supports-serialization
  • xsl:supports-backwards-compatibility
  • xsl:supports-namespace-axis

Example

xquery version "1.0-ml";

xdmp:xslt-eval(
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="foo">
   <xsl:value-of select="system-property('xsl:is-schema-aware')"/>
 </xsl:template>
</xsl:stylesheet>,
document{<foo>hello there</foo>})

=> yes

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.