XML permits token reuse, while SGML does not.
<!DOCTYPE root [ <!ELEMENT root EMPTY> <!-- SGML dislikes token reuse. It's legal XML, so any XML parser must accept it, though it's discouraged in documents "for interoperability" --> <!ATTLIST root status (initial-draft|revision|final) "initial-draft" position (first|intermediate|final) "first" > ]> <root/>
Expected result | Actual result for oracle.xml.parser.v2.SAXParser |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>position</localName> <qualifiedName>position</qualifiedName> <value>first</value> <type>NMTOKEN</type> </attribute> <attribute> <namespaceURI/> <localName>status</localName> <qualifiedName>status</qualifiedName> <value>initial-draft</value> <type>NMTOKEN</type> </attribute> </attributes> </startElement> <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> <attribute> <namespaceURI/> <localName>position</localName> <qualifiedName>position</qualifiedName> <value>first</value> <type/> </attribute> <attribute> <namespaceURI/> <localName>status</localName> <qualifiedName>status</qualifiedName> <value>initial-draft</value> <type/> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |