Test case valid-sa-088: gnu.xml.aelfred2.XmlReader Failed

Test case valid-sa-088: gnu.xml.aelfred2.XmlReader Failed

Tests whether entity references in internal entities are expanded late enough, by relying on correct handling to make the expanded text be valid. (If it's expanded too early, the entity will parse as an element that's not valid in that context.)

<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e "&lt;foo>">
]>
<doc>&e;</doc>
Expected resultActual 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>&lt;</char>
    <char>f</char>
    <char>o</char>
    <char>o</char>
    <char>&gt;</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 &gt;= 0</bug>
</ConformanceResults>