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 org.dom4j.io.aelfred.SAXDriver |
---|---|
<?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/> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/oasis/p68pass1.xml</systemID> </resolveEntity> <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/> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |