Test demonstrates an Element Type Declaration that uses the contentspec of EMPTY. The element cannot have any contents and must always appear as an empty element in the document. The test also shows an Attribute-list declaration with multiple AttDef's.
<!DOCTYPE doc [ <!ELEMENT doc (e*)> <!ELEMENT e EMPTY> <!ATTLIST e a1 CDATA #IMPLIED a2 CDATA #IMPLIED a3 CDATA #IMPLIED> ]> <doc> <e a1="v1" a2="v2" a3="v3"/> <e a1="w1" a2="v2"/> <e a1="v1" a2="w2" a3="v3"/> </doc>
Expected result | Actual 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> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a1</localName> <qualifiedName>a1</qualifiedName> <value>v1</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>a2</localName> <qualifiedName>a2</qualifiedName> <value>v2</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>a3</localName> <qualifiedName>a3</qualifiedName> <value>v3</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> </endElement> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a1</localName> <qualifiedName>a1</qualifiedName> <value>w1</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>a2</localName> <qualifiedName>a2</qualifiedName> <value>v2</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> </endElement> <ignorable>\n</ignorable> <startElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a1</localName> <qualifiedName>a1</qualifiedName> <value>v1</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>a2</localName> <qualifiedName>a2</qualifiedName> <value>w2</value> <type>CDATA</type> </attribute> <attribute> <namespaceURI/> <localName>a3</localName> <qualifiedName>a3</qualifiedName> <value>v3</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>e</localName> <qualifiedName>e</qualifiedName> </endElement> <ignorable>\n</ignorable> <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 >= 0</bug> </ConformanceResults> |