Re: question re triples in xml literals

Hi Benjamin,

I think if we break this down though, we can see that it would be very
difficult to make this work.

Essentially you have three 'layers' in your example:

 * an XHTML document that is 'carrying' the metadata;

 * the metadata itself, which contains an Atom entry;

 * the Atom entry (expressed in RDFa) which contains some further RDFa.

The approach we would normally take to the third layer is that it is
'escaped', but you are saying that you want the RDFa in the third
layer to actually be part of the second layer.

I'm sure you are familiar with RDF/XML; any RDF/XML that is placed
into an XML Literal is not available as metadata to anything
processing the 'containing' document.

In ordinary XML the same happens; if you were to put further XML
mark-up into a CDATA section, it would not be 'XML' until it was taken
out of the CDATA section and interpreted with a parser.

In short, the notion of 'escaping' data is quite fundamental, and I
think we need to be careful about breaking with that model.

However, your use-case is an interesting one. It seems that you are
saying that sometimes you are not bothered about putting RDFa into the
body of the Atom message for 'future consumption', and instead you are
adding it because you want to 'reuse' some of the information in
mark-up.

That is certainly a tricky one, since you are essentially trying to
switch off the natural 'escaping' mechanism that XML Literals have.

It might be possible in the future to introduce a new datatype that
represents the 'innerHTML' of the element, but which doesn't set
[recurse] to false, or even to have a simple attribute that indicates
whether [recurse] should be set which can override the default
behaviour (not dissimilar to the RDF/XML @parseType attribute).

But I can't see this being resolved within the _current_ version of
RDF in XHTML, since it would take too long, I'm afraid--it's quite a
large change.

Regards,

Mark


On 22/10/2007, Benjamin Nowack <bnowack@semsol.com> wrote:
>
>
> Hi,
>
> I'm just reading the syntax doc and have a question regarding the
> "[recurse] = false" rule, once an xml object is found. A sample
> use case would be the description of an rss item à la hAtom, e.g.:
>
> [[
> <div about="post.htm" instanceOf="rss:item" property="content:encoded">
>    <h2 property="rss:title">A post</h2>
>    <p property="rss:description" datatype="">
>       <a about="#foo" rel="foaf:weblog" href="http://foo.com/">Foo</a>
>       said that.
>    </p>
> </div>
> ]]
>
> i.e. I'm trying to generate
>
> [[
> <post.htm>  content:encoded "<h2>....</p>"^^rdf:XMLLiteral ;
>             rss:description "Foo said that." .
> ]]
>
> without repeating the post body. And I don't want to lose the
> triples from the rss:title/foaf:weblog info.
>
> The syntax doc says
>
> [[
> "if an author indicates that some branch of the tree should be
> treated as an XML literal, no further processing should take
> place on that branch"
> ]]
>
> which (to me) suggests that no "sub-triples" should be generated
> whenever an XMLLiteral is encountered. How would I have to
> change the code above to markup an XMLLiteral that contains
> structured RDFa information?
>
>
> Cheers,
> Benji
>
> --
> Benjamin Nowack
> http://bnode.org/
>
>
>


-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@formsPlayer.com | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.

Received on Tuesday, 23 October 2007 09:59:40 UTC