cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17763] - Internal DTD comments cause invalid XML
Date Mon, 10 Mar 2003 11:04:07 GMT
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=17763>.
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=17763

Internal DTD comments cause invalid XML

jefft@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|NamespaceNormalizingDOMStrea|Internal DTD comments cause
                   |mer doesn't support DTDs    |invalid XML



------- Additional Comments From jefft@apache.org  2003-03-10 11:04 -------
Yes you're right, it's nothing to do with the DOMStreamer.

3 months ago (Forrest's last Cocoon snapshot), Cocoon would completely ignore
SAX events between startDTD and endDTD.  Now, while it ignores the internal
subset (not implementing DeclHandler), it tries to print the <!DOCTYPE, and
comments. So this SAX stream:

[setDocumentLocator]
[startDocument]
[startDTD] name=test,publicId=,systemId=
[comment]  a comment
[endDTD]
[startElement] uri=,local=test,raw=test
[characters] Hello world
[endElement] uri=,local=test,qname=test
[endDocument]

Results in:

<!DOCTYPE test PUBLIC "" ""<!-- a comment-->>
<test>Hello world</test>

I'm assuming this isn't the Xerces serializer's fault. It is Cocoon's job not to
feed Xerces bad SAX events.

Short-term hacky solution would be to throw out all events between startDTD and
endDTD. A better longer-term solution would be to implement DeclHandler. Quite a
major change. Wish I knew when/why the old behaviour changed.

--Jeff

Mime
View raw message