- From: Gregg Kellogg <gregg@kellogg-assoc.com>
- Date: Fri, 9 Mar 2012 11:52:07 -0500
- To: Ivan Herman <ivan@w3.org>
- CC: Manu Sporny <msporny@digitalbazaar.com>, W3C RDFWA WG <public-rdfa-wg@w3.org>
On Mar 9, 2012, at 9:32 AM, Ivan Herman wrote: > Test #198: > > <!DOCTYPE html> > <html > xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> > <head> > <title>Test 0198</title> > <base href="http://www.example.org/me" /> > </head> > <body> > <div id="mark" about="#mark" typeof="foaf:Person"> > <h2 property="foaf:name" datatype="rdf:XMLLiteral"><span > property="foaf:firstName">Mark</span> <span > property="foaf:surname">Birbeck</span></h2> > </div> > </body> > </html> > > With a SPARQL request: > > ASK WHERE { > <http://www.example.org/me#mark> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . > <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/name> > "<span property=\"foaf:firstName\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">Mark</span> <span property=\"foaf:surname\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">Birbeck</span>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> . > <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/firstName> "Mark" . > <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/surname> "Birbeck" . > } > > However. While it is o.k. to have the rdf and foaf namespaces copied into the generated XML Literal, the xmlns="http://www.w3.org/1999/xhtml" is actually incorrect. In the case of XHTML1 this namespace indeed appears in the file, can therefore be copied into the XMLLiteral, ie, that test is o.k. for XHTML1+RDFa, that namespace does *not* appear for HTML5, ie, it should not be added to the XML Literal. Have I mentioned that I hate XMLLiterals? > We can create a separate test for HTML5+RDFa, doing the same but with a different SPARQL. On the other hand, in view of the controversial nature of the xmlns usage in HTML5, I would probably be o.k. to remove it from the HTML5 branch altogether. This is really where an HTMLLiteral would make sense, and use that for HTML5 instead of XMLLiteral. As I understand it, polyglot markup, where xmlns would be appropriate, would only make sense for XHTML5, not HTML5. I'd suggest we remove HTML5 (and HTML4, I suppose) from anything using xml:lang or xmlns (with the exception of the stated use of xml:lang as a namespace-less attribute, which I'd rather see go away from HTML5+RDFa). If work is ever done on HTMLLiteral (RDF WG?), then we could include this for HTML5, and it would probably be appropriate for XHTML varieties as well). > I am not sure about XHTML5. Does the namespace appears for that one? If so, it is fine to have it for that one... Being XML, I believe that xmlns is appropriate). Gregg > Ivan > > > > ---- > Ivan Herman, W3C Semantic Web Activity Lead > Home: http://www.w3.org/People/Ivan/ > mobile: +31-641044153 > FOAF: http://www.ivan-herman.net/foaf.rdf > > > > >
Received on Friday, 9 March 2012 16:52:49 UTC