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

Subject: Re: Re: [xsl] List of illegal characters for element, attribute, and variable names.
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 1 May 2006 16:35:51 +0100
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>

Current Thread