<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 30, 2014 at 10:32 PM, Michael Kay <span dir="ltr"><<a href="mailto:mike@saxonica.com" target="_blank">mike@saxonica.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>The XSLT 2.0 spec restricts the set of types available in a non-schema-aware processor. Schema awareness comes only with Saxon-EE.</div><div><br></div><div>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.</div><div><br></div><div>If it's only the castable test you are after, you could use matches(., '\i\c*')</div><div><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><br></div></div></div></div></blockquote><div><br></div><div>This returns true for matches('1880s','\i\c*') in Saxon XSLT and Zorba.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5"><div>On 30 Nov 2014, at 20:28, Ihe Onwuka <<a href="mailto:ihe.onwuka@gmail.com" target="_blank">ihe.onwuka@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div>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</div><div><br></div><div>Code is below. </div><div><br></div><div><div>        <xsl:for-each select="tokenize(substring-after(.,'&#9;'),'\t')"></div><div>          <xsl:choose></div><div>            <xsl:when test=". castable as xs:NCName"></div><div>              <xsl:element name="{.}"/></div><div>            </xsl:when></div><div>            <xsl:otherwise></div><div>              <keyword name="{.}"/></div><div>            </xsl:otherwise></div></div><div>         </xsl:for-each></div><div><br></div><div>I have tried the allow-all-built-in-types saxon attribute and that hasn't worked. </div><div><br></div><div>Any other suggestions.</div></div></div></div></blockquote></div></div></blockquote></div><br></div></div>