Test AttValue with a GE reference and single quotes as the delimiters
<?xml version="1.0"?> <!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ATTLIST student first CDATA #REQUIRED middle CDATA #IMPLIED last CDATA #REQUIRED > <!ENTITY myfirst "Snow"> <!ENTITY mymiddle "Y"> <!ENTITY mylast '&myfirst; Man'> ]> <!-- testing AttValue with a reference in single quote --> <student first='&myfirst;' last='&mylast;'>My Name is &mylast;. </student>
Expected result | Actual result for com.jclark.xml.sax.SAX2Driver |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>student</localName> <qualifiedName>student</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>first</localName> <qualifiedName>first</qualifiedName> <value>Snow</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>last</localName> <qualifiedName>last</qualifiedName> <value>Snow\sMan</value> <type>CDATA</type> </attribute> </attributes> </startElement> <char>M</char> <char>y</char> <char>\s</char> <char>N</char> <char>a</char> <char>m</char> <char>e</char> <char>\s</char> <char>i</char> <char>s</char> <char>\s</char> <char>S</char> <char>n</char> <char>o</char> <char>w</char> <char>\s</char> <char>M</char> <char>a</char> <char>n</char> <char>.</char> <char>\s</char> <endElement> <namespaceURI/> <localName>student</localName> <qualifiedName>student</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>student</localName> <qualifiedName>student</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>first</localName> <qualifiedName>first</qualifiedName> <value>Snow</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>last</localName> <qualifiedName>last</qualifiedName> <value>Snow\sMan</value> <type>CDATA</type> </attribute> </attributes> </startElement> <char>M</char> <char>y</char> <char>\s</char> <char>N</char> <char>a</char> <char>m</char> <char>e</char> <char>\s</char> <char>i</char> <char>s</char> <char>\s</char> <char>S</char> <char>n</char> <char>o</char> <char>w</char> <char>\s</char> <char>M</char> <char>a</char> <char>n</char> <char>.</char> <char>\s</char> <endElement> <namespaceURI/> <localName>student</localName> <qualifiedName>student</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |