Valid entity references. Also ensures that a charref to '&' isn't interpreted as an entity reference open delimiter
<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ENTITY ent "replacement text"> ]> <doc> &ent;aaa&ent; <!--Not a reference:--> <!--Charref to & doesn't make a delimiter--> &en </doc>
Expected result | Actual result for gnu.xml.aelfred2.XmlReader |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>r</char> <char>e</char> <char>p</char> <char>l</char> <char>a</char> <char>c</char> <char>e</char> <char>m</char> <char>e</char> <char>n</char> <char>t</char> <char>\s</char> <char>t</char> <char>e</char> <char>x</char> <char>t</char> <char>a</char> <char>a</char> <char>a</char> <char>r</char> <char>e</char> <char>p</char> <char>l</char> <char>a</char> <char>c</char> <char>e</char> <char>m</char> <char>e</char> <char>n</char> <char>t</char> <char>\s</char> <char>t</char> <char>e</char> <char>x</char> <char>t</char> <char>\n</char> <char>\n</char> <char>\n</char> <char>&</char> <char>e</char> <char>n</char> <char>\n</char> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <endDocument/> <bug reason="Parser should only throw SAXExceptions" type="java.lang.ArrayIndexOutOfBoundsException">0 >= 0</bug> </ConformanceResults> |