Tests use of external parsed entities with different encodings than the base document.
<!DOCTYPE foo [ <!ELEMENT foo (root*)> <!ELEMENT root EMPTY> <!ENTITY utf16b SYSTEM "../invalid/utf16b.xml"> <!ENTITY utf16l SYSTEM "../invalid/utf16l.xml"> ]> <foo> &utf16b; &utf16l; </foo>
Expected result | Actual result for org.apache.crimson.parser.XMLReaderImpl |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes/> </startElement> <ignorable>\s</ignorable> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/sun/invalid/utf16b.xml</systemID> </resolveEntity> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <ignorable>\n</ignorable> <ignorable>\s</ignorable> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/sun/invalid/utf16l.xml</systemID> </resolveEntity> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <ignorable>\n</ignorable> <ignorable>\s</ignorable> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes/> </startElement> <ignorable>\s</ignorable> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/sun/valid/../invalid/utf16b.xml</systemID> </resolveEntity> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <ignorable>\n</ignorable> <ignorable>\s</ignorable> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/sun/valid/../invalid/utf16l.xml</systemID> </resolveEntity> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <ignorable>\n</ignorable> <ignorable>\s</ignorable> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |