Tests construction of internal entity replacement text, using an example in the XML specification.
<!DOCTYPE root [ <!ELEMENT root (p)> <!ELEMENT p (#PCDATA)> <!-- Example 1 from XML spec 1.0 Appendix D --> <!ENTITY example "<p>An ampersand (&#38;) may be escaped numerically (&#38;#38) or with a general entity (&amp;).</p>" > ]> <root>&example;</root>
Expected result | Actual result for org.apache.crimson.parser.XMLReaderImpl |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>p</localName> <qualifiedName>p</qualifiedName> <attributes/> </startElement> <char>A</char> <char>n</char> <char>\s</char> <char>a</char> <char>m</char> <char>p</char> <char>e</char> <char>r</char> <char>s</char> <char>a</char> <char>n</char> <char>d</char> <char>\s</char> <char>(</char> <char>&</char> <char>)</char> <char>\s</char> <char>m</char> <char>a</char> <char>y</char> <char>\s</char> <char>b</char> <char>e</char> <char>\s</char> <char>e</char> <char>s</char> <char>c</char> <char>a</char> <char>p</char> <char>e</char> <char>d</char> <char>\n</char> <char>n</char> <char>u</char> <char>m</char> <char>e</char> <char>r</char> <char>i</char> <char>c</char> <char>a</char> <char>l</char> <char>l</char> <char>y</char> <char>\s</char> <char>(</char> <char>&</char> <char>#</char> <char>3</char> <char>8</char> <char>)</char> <char>\s</char> <char>o</char> <char>r</char> <char>\s</char> <char>w</char> <char>i</char> <char>t</char> <char>h</char> <char>\s</char> <char>a</char> <char>\s</char> <char>g</char> <char>e</char> <char>n</char> <char>e</char> <char>r</char> <char>a</char> <char>l</char> <char>\s</char> <char>e</char> <char>n</char> <char>t</char> <char>i</char> <char>t</char> <char>y</char> <char>\s</char> <char>(</char> <char>&</char> <char>a</char> <char>m</char> <char>p</char> <char>;</char> <char>)</char> <char>.</char> <endElement> <namespaceURI/> <localName>p</localName> <qualifiedName>p</qualifiedName> </endElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>p</localName> <qualifiedName>p</qualifiedName> <attributes/> </startElement> <char>A</char> <char>n</char> <char>\s</char> <char>a</char> <char>m</char> <char>p</char> <char>e</char> <char>r</char> <char>s</char> <char>a</char> <char>n</char> <char>d</char> <char>\s</char> <char>(</char> <char>&</char> <char>)</char> <char>\s</char> <char>m</char> <char>a</char> <char>y</char> <char>\s</char> <char>b</char> <char>e</char> <char>\s</char> <char>e</char> <char>s</char> <char>c</char> <char>a</char> <char>p</char> <char>e</char> <char>d</char> <char>\n</char> <char>n</char> <char>u</char> <char>m</char> <char>e</char> <char>r</char> <char>i</char> <char>c</char> <char>a</char> <char>l</char> <char>l</char> <char>y</char> <char>\s</char> <char>(</char> <char>&</char> <char>#</char> <char>3</char> <char>8</char> <char>)</char> <char>\s</char> <char>o</char> <char>r</char> <char>\s</char> <char>w</char> <char>i</char> <char>t</char> <char>h</char> <char>\s</char> <char>a</char> <char>\s</char> <char>g</char> <char>e</char> <char>n</char> <char>e</char> <char>r</char> <char>a</char> <char>l</char> <char>\s</char> <char>e</char> <char>n</char> <char>t</char> <char>i</char> <char>t</char> <char>y</char> <char>\s</char> <char>(</char> <char>&</char> <char>a</char> <char>m</char> <char>p</char> <char>;</char> <char>)</char> <char>.</char> <endElement> <namespaceURI/> <localName>p</localName> <qualifiedName>p</qualifiedName> </endElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |