Tests a document with wrong combination of misc and element. One PI occurs between two elements.
<?xml version="1.0"?> <!DOCTYPE doc [ <!ELEMENT doc ANY> <!ELEMENT title ANY> ]> <doc>Wrong combination!</doc> <?PI after document element?> <title>Wrong combination!</title> <?PI after title element?>
Expected result | Actual result for com.bluecast.xml.Piccolo |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <char>W</char> <char>r</char> <char>o</char> <char>n</char> <char>g</char> <char>\s</char> <char>c</char> <char>o</char> <char>m</char> <char>b</char> <char>i</char> <char>n</char> <char>a</char> <char>t</char> <char>i</char> <char>o</char> <char>n</char> <char>!</char> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <processingInstruction> <target>PI</target> <data>after\sdocument\selement</data> </processingInstruction> <fatalError/> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <char>W</char> <char>r</char> <char>o</char> <char>n</char> <char>g</char> <char>\s</char> <char>c</char> <char>o</char> <char>m</char> <char>b</char> <char>i</char> <char>n</char> <char>a</char> <char>t</char> <char>i</char> <char>o</char> <char>n</char> <char>!</char> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <processingInstruction> <target>PI</target> <data>after\sdocument\selement</data> </processingInstruction> <startElement> <namespaceURI/> <localName>title</localName> <qualifiedName>title</qualifiedName> <attributes/> </startElement> <fatalError/> <endDocument/> <bug reason="Parser should only throw SAXExceptions" type="java.lang.ArrayIndexOutOfBoundsException">-1</bug> </ConformanceResults> |