xsl-list
[Top] [All Lists]

Re: [xsl] 0x19 is not a legal XML character

2007-06-28 03:23:53
Mulberry Technologies List Owner wrote:
Friends --

Unless you have an XSL-based solution to this problem please respond off list only.

I'll give that a try. Not sure this works, though, haven't tried it:

<xsl:template match="main">
<xsl:value-of select="replace(unparsed-text('offended-xml-file.xml'), '&#x19;', '')" />
</xsl:template>

Using Saxon, set it to use the XML 1.1 feature to 'on', like this:

   java -jar saxon8.jar -1.1 -it main mytransform.xslt >new-output.xml

this may work and will remove all offending U+0019 chars. You must set the XML 1.1 features, because otherwise it cannot read any data (XML or otherwise) that contain non-XML 1.0 characters. The only character not allowed in XML 1.1 is U+0000.

Cheers,
-- Abel Braaksma

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