Ihe Onwuka
2014-12-01 08:06:34 UTC
The XSLT 2.0 spec restricts the set of types available in a
non-schema-aware processor. Schema awareness comes only with Saxon-EE.
The extension attribute saxon:allow-all-built-in-types removes the
restriction (making the processor non-conformant), but like all extensions
in the Saxon namespace, it is available only with Saxon-PE or higher.
If it's only the castable test you are after, you could use matches(.,
'\i\c*')
This returns true for matches('1880s','\i\c*') in Saxon XSLT and Zorba.non-schema-aware processor. Schema awareness comes only with Saxon-EE.
The extension attribute saxon:allow-all-built-in-types removes the
restriction (making the processor non-conformant), but like all extensions
in the Saxon namespace, it is available only with Saxon-PE or higher.
If it's only the castable test you are after, you could use matches(.,
'\i\c*')
I have a sequence of keywords which I would like to create as empty
elements if their content constitutes a valid element name but I cannot
execute the following because of the above restriction that prevents the
comparison to xs:NCName
Code is below.
<xsl:for-each select="tokenize(substring-after(.,'	'),'\t')">
<xsl:choose>
<xsl:when test=". castable as xs:NCName">
<xsl:element name="{.}"/>
</xsl:when>
<xsl:otherwise>
<keyword name="{.}"/>
</xsl:otherwise>
</xsl:for-each>
I have tried the allow-all-built-in-types saxon attribute and that hasn't
worked.
Any other suggestions.
elements if their content constitutes a valid element name but I cannot
execute the following because of the above restriction that prevents the
comparison to xs:NCName
Code is below.
<xsl:for-each select="tokenize(substring-after(.,'	'),'\t')">
<xsl:choose>
<xsl:when test=". castable as xs:NCName">
<xsl:element name="{.}"/>
</xsl:when>
<xsl:otherwise>
<keyword name="{.}"/>
</xsl:otherwise>
</xsl:for-each>
I have tried the allow-all-built-in-types saxon attribute and that hasn't
worked.
Any other suggestions.