On Sun, Nov 30, 2014 at 10:32 PM, Michael Kay <[email protected]> wrote:

> 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.


> On 30 Nov 2014, at 20:28, Ihe Onwuka <[email protected]> wrote:
>
> 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(.,'&#9;'),'\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.
>
>
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to