xsl-list
[Top] [All Lists]

Re: Re: [xsl] List of illegal characters for element, attribute, and variable names.

2006-05-01 08:36:06
So let me re-phrase. Where can I find a list of prohibited English-language 
script characters?

This stylesheet gives you all prohibited latin1 characters:

<xsl:stylesheet version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="text" encoding="ISO-8859-1"/>
<xsl:variable name="latin1" as="xs:integer+">
        <xsl:sequence select="32 to 126"/>
        <xsl:sequence select="160 to 255"/>
</xsl:variable>
<xsl:template match="/">
        <xsl:for-each select="$latin1">
                <xsl:if test="not(matches(codepoints-to-string(.), 
'[a-zA-Z0-9\.\-_]'))">
                        <xsl:value-of select="concat(., ' ', codepoints-to-string(.), 
'&#xa;')"/>
                </xsl:if>
        </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--