Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type. The test also shows that FIXED is a valid DefaultDecl and that an value can be given to the attribute.
<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ATTLIST doc a CDATA #FIXED "v"> ]> <doc></doc>
Expected result | Actual result for org.apache.crimson.parser.XMLReaderImpl |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a</localName> <qualifiedName>a</qualifiedName> <value>v</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a</localName> <qualifiedName>a</qualifiedName> <value>v</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |