Tests clauses 1, 3, and 4 of the Element Valid validity constraint.
<!DOCTYPE root [ <!ELEMENT root ANY> <!ELEMENT empty EMPTY> <!ELEMENT mixed1 (#PCDATA)> <!ELEMENT mixed2 (#PCDATA)*> <!ELEMENT mixed3 (#PCDATA|empty)*> ]> <root> <empty/> <mixed1/> <mixed1></mixed1> <mixed2/> <mixed2></mixed2> <mixed3/> <mixed3></mixed3> <mixed1>allowed</mixed1> <mixed1><![CDATA[<allowed>]]></mixed1> <mixed2>also</mixed2> <mixed2><![CDATA[<% illegal otherwise %>]]></mixed2> <mixed3>moreover</mixed3> <mixed1>allowed & stuff</mixed1> <mixed2>also</mixed2> <mixed3>moreover <empty></empty> </mixed3> <mixed3>moreover <empty/> </mixed3> <mixed3><empty/> </mixed3> <mixed3><empty/> too</mixed3> </root>
Expected result | Actual result for com.bluecast.xml.Piccolo |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char><</char> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <char>></char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>s</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char><</char> <char>%</char> <char>\s</char> <char>i</char> <char>l</char> <char>l</char> <char>e</char> <char>g</char> <char>a</char> <char>l</char> <char>\s</char> <char>o</char> <char>t</char> <char>h</char> <char>e</char> <char>r</char> <char>w</char> <char>i</char> <char>s</char> <char>e</char> <char>\s</char> <char>%</char> <char>></char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <char>\s</char> <char>&</char> <char>\s</char> <char>s</char> <char>t</char> <char>u</char> <char>f</char> <char>f</char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>s</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <char>t</char> <char>o</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <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> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char><</char> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <char>></char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>s</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char><</char> <char>%</char> <char>\s</char> <char>i</char> <char>l</char> <char>l</char> <char>e</char> <char>g</char> <char>a</char> <char>l</char> <char>\s</char> <char>o</char> <char>t</char> <char>h</char> <char>e</char> <char>r</char> <char>w</char> <char>i</char> <char>s</char> <char>e</char> <char>\s</char> <char>%</char> <char>></char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>l</char> <char>o</char> <char>w</char> <char>e</char> <char>d</char> <char>\s</char> <char>&</char> <char>\s</char> <char>s</char> <char>t</char> <char>u</char> <char>f</char> <char>f</char> <endElement> <namespaceURI/> <localName>mixed1</localName> <qualifiedName>mixed1</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> <attributes/> </startElement> <char>a</char> <char>l</char> <char>s</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed2</localName> <qualifiedName>mixed2</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <char>m</char> <char>o</char> <char>r</char> <char>e</char> <char>o</char> <char>v</char> <char>e</char> <char>r</char> <char>\s</char> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\s</char> <char>\s</char> <char>\s</char> <char>\s</char> <startElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> <attributes/> </startElement> <startElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> <attributes/> </startElement> <endElement> <namespaceURI/> <localName>empty</localName> <qualifiedName>empty</qualifiedName> </endElement> <char>\s</char> <char>t</char> <char>o</char> <char>o</char> <endElement> <namespaceURI/> <localName>mixed3</localName> <qualifiedName>mixed3</qualifiedName> </endElement> <char>\n</char> <char>\n</char> <endElement> <namespaceURI/> <localName>root</localName> <qualifiedName>root</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |