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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to