Re: [xslt] bug in escaping cdata inside cdata inside cdata-section-element?
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] bug in escaping cdata inside cdata inside cdata-section-element?
- Date: Thu, 25 Sep 2003 15:54:43 -0400
On Thu, Sep 25, 2003 at 03:10:01PM -0400, Peter Pawlowski wrote:
> I have some input XML which contains CDATA elements escaped inside of
> other CDATA elements:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <collection>
> <test><![CDATA[
> <![CDATA[abc]]]>]><![CDATA[
> ]]></test>
> </collection>
>
>
> not the most attractive XML, I'll admin. but when I apply this simple XSL
> to just copy the input (and add 'test' to the list of
> cdata-section-elements):
>
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> >
> <xsl:output method="xml" encoding="UTF-8"
> cdata-section-elements="test"
> />
>
> <xsl:template match="/">
> <xsl:copy-of select="*" />
> </xsl:template>
> </xsl:stylesheet>
>
>
> I get this output:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <collection>
> <test><![CDATA[
> <![CDATA[abc]]>
> ]]></test>
> </collection>
>
>
> since the ']]>' has not been re-escaped, this is now broken XML.
>
> my version:
>
> [pawlowski]$ libxslt/xsltproc -V
> Using libxml 20509, libxslt 10033 and libexslt 722
> xsltproc was compiled against libxml 20509, libxslt 10033 and
> libexslt 722
> libxslt 10033 was compiled against libxml 20509
> libexslt 722 was compiled against libxml 20509
Right, this looks like a bug, can you bugzilla it so it doesn't
get lost, the bug is actually in libxml2 serailization layer.
http://xmlsoft.org/XSLT/bugs.html
thanks !
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]