1.1 style prefix unbinding and rebinding
<?xml version="1.1"?> <!-- 1.1 style prefix unbinding and rebinding --> <foo xmlns:a="http://example.org/namespace"> <bar xmlns:a=""> <foo xmlns:a="http://example.org/other-namespace" a:attr="1"/> </bar> </foo>
Expected result | Actual result for com.jclark.xml.sax.SAX2Driver |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startPrefixMapping> <prefix>a</prefix> <data>http://example.org/namespace</data> </startPrefixMapping> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>\s</char> <startPrefixMapping> <prefix>a</prefix> <data/> </startPrefixMapping> <startElement> <namespaceURI/> <localName>bar</localName> <qualifiedName>bar</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>\s</char> <char>\s</char> <startPrefixMapping> <prefix>a</prefix> <data>http://example.org/other-namespace</data> </startPrefixMapping> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes> <attribute> <namespaceURI>http://example.org/other-namespace</namespaceURI> <localName>attr</localName> <qualifiedName>a:attr</qualifiedName> <value>1</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endPrefixMapping> <prefix>a</prefix> </endPrefixMapping> <char>\n</char> <char>\s</char> <endElement> <namespaceURI/> <localName>bar</localName> <qualifiedName>bar</qualifiedName> </endElement> <endPrefixMapping> <prefix>a</prefix> </endPrefixMapping> <char>\n</char> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endPrefixMapping> <prefix>a</prefix> </endPrefixMapping> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startPrefixMapping> <prefix>a</prefix> <data>http://example.org/namespace</data> </startPrefixMapping> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>\s</char> <startPrefixMapping> <prefix>a</prefix> <data/> </startPrefixMapping> <startElement> <namespaceURI/> <localName>bar</localName> <qualifiedName>bar</qualifiedName> <attributes/> </startElement> <char>\n</char> <char>\s</char> <char>\s</char> <startPrefixMapping> <prefix>a</prefix> <data>http://example.org/other-namespace</data> </startPrefixMapping> <startElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> <attributes> <attribute> <namespaceURI>http://example.org/other-namespace</namespaceURI> <localName>attr</localName> <qualifiedName>a:attr</qualifiedName> <value>1</value> <type>CDATA</type> </attribute> </attributes> </startElement> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endPrefixMapping> <prefix>a</prefix> </endPrefixMapping> <char>\n</char> <char>\s</char> <endElement> <namespaceURI/> <localName>bar</localName> <qualifiedName>bar</qualifiedName> </endElement> <char>\n</char> <endElement> <namespaceURI/> <localName>foo</localName> <qualifiedName>foo</qualifiedName> </endElement> <endPrefixMapping> <prefix>a</prefix> </endPrefixMapping> <endDocument/> </ConformanceResults> |