You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/02/01 14:25:27 UTC
DO NOT REPLY [Bug 6176] New: -
Processing instruction cannot precede doctype
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=6176>.
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=6176
Processing instruction cannot precede doctype
Summary: Processing instruction cannot precede doctype
Product: Xerces2-J
Version: 2.0.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: paul@prescod.net
Given:
public static void main(String []args) throws SAXException{
XMLSerializer serializer = new XMLSerializer();
serializer.setOutputByteStream(System.out);
serializer.startDocument();
serializer.processingInstruction("foo", "bar");
serializer.startDTD("foo", "bar", "baz");
serializer.startElement("foo", "bar", "bar", null);
serializer.endElement("foo", "bar", "bar");
serializer.endDocument();
}
Xerces goes to a great deal of effort to make the processing instruction appear
AFTER the doctype (serializePreRoot etc.). But why is this so? It is perfectly
legal in XML for a processing instruction to proceed the doctype!
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org