- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Thu, 13 Mar 2008 15:03:48 +0000
- To: "Ivan Herman" <ivan@w3.org>
- Cc: "W3C RDFa task force" <public-rdf-in-xhtml-tf@w3.org>, "Semantic Web" <semantic-web@w3.org>, "Jeremy J. Carroll" <jjc@hpl.hp.com>
Hi Ivan, (And semantic-web@w3.org!) > I am afraid I diverge a bit with your analysis, although I agree that we > have to be a bit loose in the final specification. Ok. > You refer to the RDF Concept document which, indeed, refers to the XML > canonicalization. Right...after all, that's the only document we refer to in the spec, and it's the only document of relevance for a new serialisation of RDF, which RDFa is. > However... let us look, for example, at the RDF/XML > document[1]. Note that the section on XML Literals does *not* say that > the XML Literal *in the RDF XML serialiation* must be canonicalized. But why would it? You only normalise after parsing. > Actually, the example in that very section: > > <?xml version="1.0"?> > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:ex="http://example.org/stuff/1.0/"> > <rdf:Description rdf:about="http://example.org/item01"> > <ex:prop rdf:parseType="Literal" > xmlns:a="http://example.org/a#"><a:Box required="true"> > <a:widget size="10" /> > <a:grommit id="23" /></a:Box> > </ex:prop> > </rdf:Description> > </rdf:RDF> > > > is not doing this either, because the namespace definition for 'a' is > _not_ on the XMLLiteral portion but the 'enclosing' XML element (which > represents a predicate and is not part of the XML Literal object). But this is the mark-up, not the RDF. You have to turn this into an rdf:XMLLiteral. > What the document says is that *when the encoding is transformed into an > RDF Graph*, then the canonicalization must be performed. Look at section > 7.2.17 of the grammar production rules[3] which essentially says that. > Ie, the RDF/XML parser, seeing the code above, must produce an XML > Literal with the lexical part being: > > <a:Box xmlns:a="http://example.org/a#" required="true"> > <a:widget size="10" /> > <a:grommit id="23" /></a:Box> > > (note the namespace declaration that has been moved 'down' to the > <a:Box> element.) I know. :) What are you telling me? > What this means is that if my RDFa parser produces an RDF/XML output, > the only thing I have to make sure is that all namespaces *are* defined > somewhere on the RDF/XML tree, so that an RDF/XML parser would be able > to to a proper job in the canonicalization. That's up to you, Ivan, in that you are entitled to do whatever you like with your parser. But the output of an RDFa parser is not RDF/XML, but an RDF graph. > One way would be to say that > we 'dump', as you say, all the namespace information to all the top > level nodes of an XML literal. But, in fact, if I don't do anything > except adding the xhtml namespace on the rdf:RDF level, too, this would > also be perfectly acceptable. It's no good, I'm afraid, Ivan. You can't solve the problem in one serialisation of RDF by saying that you are going to convert it to another serialisation of RDF; the output from an RDFa parser is an RDF graph, not RDF/XML. > Hence a certain looseness in the way we > would define this thing... But I do not think the canonicalization > algorithm is supposed to be applied on that point. > > The problem occurs when an RDFa implementation produces directly an RDF > graph. Then, of course, somebody along the line must perform the > canonicalization. But that, in some ways, another matter. Ah...ok... But that is the only issue that concerns us. If you convert to RDF/XML en route that's a bonus for you, and you've saved yourself some implementation hassle. But that doesn't help with the general problem. > Now let us see what wiser people like Jeremy will tell us:-) Yes, let's. :) Regards, Mark -- Mark Birbeck mark.birbeck@x-port.net | +44 (0) 20 7689 9232 http://www.x-port.net | http://internet-apps.blogspot.com x-port.net Ltd. is registered in England and Wales, number 03730711 The registered office is at: 2nd Floor Titchfield House 69-85 Tabernacle Street London EC2A 4RR
Received on Thursday, 13 March 2008 15:04:23 UTC