Tests invalid DefaultDecl which is against P60 VC: Required Attribute. The attribute "chapter" for the element "two" is declared as #REQUIRED in the DefaultDecl in the AttlistDecl, but the value of this attribute is not given.
<?xml version="1.0"?> <!-- validity test for Production 60--> <!DOCTYPE Java [ <!ELEMENT Java ANY> <!ELEMENT one EMPTY> <!ELEMENT two EMPTY> <!ATTLIST one chapter CDATA #REQUIRED> <!ATTLIST two chapter CDATA #REQUIRED> ]> <Java> <one chapter="Introduction"></one> <two></two> Negative test for Required Attribute. Some occurrence of an element with an attribute of #REQUIRED default declaration does not give the value of those attribute </Java>
Expected result | Actual result for gnu.xml.aelfred2.XmlReader |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>Java</localName> <qualifiedName>Java</qualifiedName> <attributes/> </startElement> <char>\n</char> <startElement> <namespaceURI/> <localName>one</localName> <qualifiedName>one</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>chapter</localName> <qualifiedName>chapter</qualifiedName> <value>Introduction</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>one</localName> <qualifiedName>one</qualifiedName> </endElement> <char>\n</char> <startElement> <namespaceURI/> <localName>two</localName> <qualifiedName>two</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>two</localName> <qualifiedName>two</qualifiedName> </endElement> <char>\n</char> <char>N</char> <char>e</char> <char>g</char> <char>a</char> <char>t</char> <char>i</char> <char>v</char> <char>e</char> <char>\s</char> <char>t</char> <char>e</char> <char>s</char> <char>t</char> <char>\s</char> <char>f</char> <char>o</char> <char>r</char> <char>\s</char> <char>R</char> <char>e</char> <char>q</char> <char>u</char> <char>i</char> <char>r</char> <char>e</char> <char>d</char> <char>\s</char> <char>A</char> <char>t</char> <char>t</char> <char>r</char> <char>i</char> <char>b</char> <char>u</char> <char>t</char> <char>e</char> <char>.</char> <char>\s</char> <char>S</char> <char>o</char> <char>m</char> <char>e</char> <char>\s</char> <char>o</char> <char>c</char> <char>c</char> <char>u</char> <char>r</char> <char>r</char> <char>e</char> <char>n</char> <char>c</char> <char>e</char> <char>\s</char> <char>o</char> <char>f</char> <char>\s</char> <char>a</char> <char>n</char> <char>\s</char> <char>e</char> <char>l</char> <char>e</char> <char>m</char> <char>e</char> <char>n</char> <char>t</char> <char>\s</char> <char>w</char> <char>i</char> <char>t</char> <char>h</char> <char>\s</char> <char>\n</char> <char>a</char> <char>n</char> <char>\s</char> <char>a</char> <char>t</char> <char>t</char> <char>r</char> <char>i</char> <char>b</char> <char>u</char> <char>t</char> <char>e</char> <char>\s</char> <char>o</char> <char>f</char> <char>\s</char> <char>#</char> <char>R</char> <char>E</char> <char>Q</char> <char>U</char> <char>I</char> <char>R</char> <char>E</char> <char>D</char> <char>\s</char> <char>d</char> <char>e</char> <char>f</char> <char>a</char> <char>u</char> <char>l</char> <char>t</char> <char>\s</char> <char>d</char> <char>e</char> <char>c</char> <char>l</char> <char>a</char> <char>r</char> <char>a</char> <char>t</char> <char>i</char> <char>o</char> <char>n</char> <char>\s</char> <char>d</char> <char>o</char> <char>e</char> <char>s</char> <char>\s</char> <char>n</char> <char>o</char> <char>t</char> <char>\s</char> <char>g</char> <char>i</char> <char>v</char> <char>e</char> <char>\s</char> <char>t</char> <char>h</char> <char>e</char> <char>\s</char> <char>v</char> <char>a</char> <char>l</char> <char>u</char> <char>e</char> <char>\s</char> <char>o</char> <char>f</char> <char>\s</char> <char>\n</char> <char>t</char> <char>h</char> <char>o</char> <char>s</char> <char>e</char> <char>\s</char> <char>a</char> <char>t</char> <char>t</char> <char>r</char> <char>i</char> <char>b</char> <char>u</char> <char>t</char> <char>e</char> <char>\n</char> <endElement> <namespaceURI/> <localName>Java</localName> <qualifiedName>Java</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> |