This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arturcz
Recipients arturcz, eric.araujo
Date 2014-02-21.10:14:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Eric, I'm not sure what exactly your concern is, but I'll try to address two issues I can see.

First: both strings <![CDATA[]]]]> and <![CDATA[>]]> are a correct and valid examples of CDATA usage as per specification[1].

Second: is it allowed to have two occurences of CDATA inside one element? The same specification says only that ‟CDATA sections may occur anywhere character data may occur”. There is nothing said if multiple occurrences are allowed or disallowed.
Wikipedia suggests in [2] that it is OK, giving the same example of embedding ]]> inside CDATA. There is no hints in Talk page that this solution doesn't work for someone.
In other example [3] there is explicitly stated that: ‟the [...] application shouldn't care about the difference between abc and <![CDATA[abc]]> and <![CDATA[a]]><![CDATA[bc]]>”.

Last but not least: using following schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="">
    <xs:element name="foo"/>

following XML file:

<?xml version="1.0" ?>

validates correctly with xmllint:
$ xmllint -noout --schema schema.xsd t.xml
t.xml validates

I hope it dissolves your concerns.

PS. I noticed I missed one ] in provided patch. There should be four of them in second parameter of replace.

Date User Action Args
2014-02-21 10:14:53arturczsetrecipients: + arturcz, eric.araujo
2014-02-21 10:14:53arturczsetmessageid: <>
2014-02-21 10:14:53arturczlinkissue20714 messages
2014-02-21 10:14:51arturczcreate