Test demonstrates that extra whitespace is normalized into a single space character in an attribute of type NMTOKENS.
<!DOCTYPE doc [ <!ATTLIST doc a1 NMTOKENS " 1 2 "> <!ELEMENT doc (#PCDATA)> ]> <doc></doc>
Expected result | Actual result for org.dom4j.io.aelfred.SAXDriver |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a1</localName> <qualifiedName>a1</qualifiedName> <value>1\s2</value> <type>NMTOKENS</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/sa/096.xml</systemID> </resolveEntity> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes> <attribute> <namespaceURI/> <localName>a1</localName> <qualifiedName>a1</qualifiedName> <value>1\s2</value> <type>NMTOKENS</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName/> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |