Test 0198 - XHTML1/XHTML5 - XMLLiteral & prefixes

I have been looking at testing 0198 for XHTML1/XHTML5 as my produced
literal doesn't not include the same set of XML namespace
declarations.

The test case input are at [1],[2].  In both inputs, the "rdf:" and
"foaf:" prefixes are declared via a prefix attribute.  As they are not
XML namespace attributes (e.g. xmlns:rdf or xmlns:foaf), they won't be
included in the serialization.

I looked at the specification [3] and I don't see anywhere were it
says that the prefixes declared via other mechanism should be turned
into XML namespace attributes.  Meanwhile, the expected test output
[4],[5] have them in the XMLLiteral value.  My implementation doesn't
no mess with the automatic XML serialization it gets from the
browser's serializer.

I believe the tests are incorrect in this regard.

While adding extra namespaces doesn't not necessarily hurt the
serialized markup, there is a burden placed on implementors to keep
track of the in-scope prefixes and namespace declarations for the
literal value when they defer serialization.  In my case, the XML
nodes are kept instead of a literal value and I only serialize on
demand.

Again, I don't see anywhere in the RDFa 1.1 specification where it
says I must merge the prefixes and in-scope namespaces for XMLLiteral
values.

[1] http://rdfa.info/test-suite/test-cases/rdfa1.1/xhtml1/0198.xhtml
[2] http://rdfa.info/test-suite/test-cases/rdfa1.1/xhtml5/0198.xhtml
[3] http://www.w3.org/TR/rdfa-syntax/#PS-current-object-literal
[4] http://rdfa.info/test-suite/test-cases/rdfa1.1/xhtml1/0198.sparql
[5] http://rdfa.info/test-suite/test-cases/rdfa1.1/xhtml5/0198.sparql

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Wednesday, 2 July 2014 22:08:30 UTC