DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24629>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24629 XMLSerializer should write ]]> in text node as ]]> Summary: XMLSerializer should write ]]> in text node as ]]> Product: Xerces2-J Version: 2.0.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Serialization AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have an XML document with an escaped CDATA section in it: <Item Item_ID="398" Semantic_Name="Album" Semantic_Set_Name="Garden Stuff"> <Descriptor>Evan's Garden 2003 <![CDATA[cdata]]></Descriptor> </Item> After reading it with Xerces and writing it out with XMLSerializer and setIndenting(true), it turns into: <Item Item_ID="398" Semantic_Name="Album" Semantic_Set_Name="Garden Stuff"> <Descriptor>Evan's Garden 2003 <![CDATA[cdata]]></Descriptor> </Item> Xalan doesn't like this: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section. I suspect it is actually Xerces that throws the exception under the hood, but I'm not entirely sure. Anyway, section 2.4 of the XML Specification states: [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) (Looks like some perl code I wrote once ;-) It means that ]]> is not allowed in text blocks (just like the exception says.) I think I'm using Xerces 2.5.0. Sorry I can't be more specific... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
