Project

Profile

Help

Bug #4328 ยป get-pseudo-attribute.xsl

Tony Graham, 2019-10-01 21:52

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
exclude-result-prefixes="#all"
version="3.0">

<xsl:output method="text" />

<xsl:template name="xsl:initial-template">
<xsl:message select="'version:', system-property('xsl:product-version')" />

<xsl:variable name="content"
select="'pseudo=&quot;value&quot;'"
as="xs:string" />

<xsl:for-each select="$content">
<xsl:message>
<xsl:value-of
select="'pseudo: ''',
saxon:get-pseudo-attribute('pseudo'),
''' (',
exists(saxon:get-pseudo-attribute('pseudo')),
')'"
separator="" />
</xsl:message>
<xsl:message>
<xsl:value-of
select="'bogus: ''',
saxon:get-pseudo-attribute('bogus'),
''' (',
exists(saxon:get-pseudo-attribute('bogus')),
')'"
separator="" />
</xsl:message>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
    (1-1/1)