Re: Possible solutions for ISSUE 87

Hi Ivan,


>  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.


>  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=""
>           xmlns:ex="">
>    <rdf:Description rdf:about="">
>      <ex:prop rdf:parseType="Literal"
>               xmlns: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

>  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="" 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.


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. :)



  Mark Birbeck | +44 (0) 20 7689 9232 | Ltd. is registered in England and Wales, number 03730711
  The registered office is at:

    2nd Floor
    Titchfield House
    69-85 Tabernacle Street
    EC2A 4RR

Received on Thursday, 13 March 2008 15:04:28 UTC