[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Problems with apersand (&) when trying to dynamica
> This looks like the neatest solution available to me but I am > having a bit of trouble getting it working. I have created > the throw away XSLT stylesheet with the following: > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > <xsl:template match="/"> > <xsl:for-each select="32 to 65535"> > <xsl:value-of select="codepoints-to-string(.)"/> > Error at xsl:value-of on line 5 of > file:/C:/saxon/generatecharstring.xsl: > FOCH0001: Invalid XML character [x d800] Transformation > failed: Run-time errors were reported > > Have I misunderstood what you meant? > No, it was just an oversight on my part that 32 to 65535 includes the characters in the surrogate range, which are not legal characters when used on their own. You'll have to handle this by something like <xsl:for-each select="32 to 65535"> <xsl:choose> <xsl:when test=.. in surrogate range .." <xsl:value-of select="codepoints-to-string(.)"/> </xsl:when> <xsl:otherwise>*</xsl:otherwise"> IIRC the surrogate range is d800 to dfff. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|