[ http://issues.apache.org/jira/browse/XALANJ-2051?page=comments#action_59364 ] Brian Minchau commented on XALANJ-2051: ---------------------------------------
A serializer (class that extends SerializerBase) serializes copy21.xml as: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE test [ <!ELEMENT test (extEnt)> <!ELEMENT extEnt (sub2)> <!ATTLIST extEnt attr CDATA #REQUIRED> <!ELEMENT sub2 (#PCDATA)> <!ENTITY extEnt SYSTEM "ent21.xml" > ]> <test> z</test> Notice the 'z' between <test> and </test>. This is because ent21.xml has contents: <?xml version="1.0" encoding="UTF-8" ?> <extEnt attr="x"><sub2>z</sub2></extEnt> and the serializer ignores all startElement() and endElement() calls while expanding such an entity. Is this right? Only the 'z' survives. I'd like an API on the serializer: Serializer.expandDTDEntities(false); The default value would be true. > XML Serializer serializes some DTD information, but not all > ----------------------------------------------------------- > > Key: XALANJ-2051 > URL: http://issues.apache.org/jira/browse/XALANJ-2051 > Project: XalanJ2 > Type: Bug > Components: Serialization > Reporter: Brian Minchau > Assignee: Brian Minchau > Attachments: ToStream-patch.txt > > It may be questionable about why the XML serializer serializes DTD events, > but it does. > However it is inconsistent in which DTD information it serializes, and which > information it looses. > When simply taking an XML document as input and serializing it to an XML > document (round tripping) it would be better if the full support was there, > rather than partial support as it is now. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
