W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > December 2008

Re: Markup questions: html/body, datatype="", double predicates

From: Richard Cyganiak <richard@cyganiak.de>
Date: Wed, 10 Dec 2008 17:10:30 +0000
Cc: public-rdfa@w3.org, W3C RDFa task force <public-rdf-in-xhtml-tf@w3.org>
Message-Id: <91C00010-84F9-45AA-9C7F-97B529E2453A@cyganiak.de>
To: Ivan Herman <ivan@w3.org>

Hi Ivan (and other spec lawyers),

On 10 Dec 2008, at 12:49, Ivan Herman wrote:
> because the distiller is a piece of software, and was written by me,
> therefore distiller has bugs:-) That is part of the ABox:-)

Then let's try to identify some of those blank nodes ;-)

>> 2. Behaviour of datatype="" when the content includes *RDFa* markup.
>> Let's say I have this in my HTML:
>>
>> <p about="#me" property="bio:olb">
>>  I work at
>>  <a rel="foaf:workplaceHomepage" href="http://www.deri.ie/">DERI
>>  Galway</a>.
>> </p>
>>
>> This works as expected, it creates two triples, a bio:olb triple  
>> whose
>> value is an rdf:XMLLiteral, and a foaf:workplaceHomepage triple whose
>> value is the DERI URL.
>>
>
> ???  I have put up your test file on the web by removing the  
> @datatype:
>
> http://www.ivan-herman.net/Misc/2008/cyg-test.html
>
> and what I get via the distiller is:
>
> <http://www.ivan-herman.net/Misc/2008/cyg-test.html#me> bio:olb "I  
> work
> at <a href=\"http://www.deri.ie/\" rel=\"foaf:workplaceHomepage\"
> xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">DERI
> Galway</a>."^^rdf:XMLLiteral.
>
> Ie, the foaf:workplaceHomepage triple is _not_ generated.
>
> And that is correct! As Toby said in his reply, if a property is found
> and a literal is generated, all processing should stop at that  
> point...
> I remember that we had lots of discussion on that issue in the group,
> but that is indeed the final conclusion.

You are right, I was confused. When there is no @datatype, then an XML  
literal is generated, and the RDFa inside it is not parsed, which is  
the behaviour described in the spec. My apologies.

>> Now I want the bio:olb as a plain literal, so I add datatype="" to  
>> the
>> <p> tag. This creates the expected plain literal, but the
>> foaf:workplaceHomepage triple disappears. Annoying! Is this the  
>> correct
>> result? I sort of hope that it's a bug in the RDFa Distiller...
>
> Again, this behaviour is actually the right one. Labelling a subtree  
> as
> a @property means that this subtree is, sort of, removed from the RDFa
> processing.

Are you sure?

Quoting the spec: “Processing generally continues recursively through  
the entire tree of elements available. However, 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, and setting this  
flag tofalse would have that effect.”

It doesn't say anything about stopping when the author indicates that  
some branch should be treated as a plain literal.

Also relevant: “Once the triple has been created, if the [datatype] of  
the [current object literal] is rdf:XMLLiteral, then the [recurse]  
flag is set to false.”

Reading this makes me just more confused. I'm not sure how to  
interpret this. Obviously, if I set @datatype to rdf:XMLLiteral, then  
it should not recurse, that's clear.

But what if I don't specify @datatype at all? This will generate an  
XML literal if there's markup in the child nodes. But does it trigger  
the condition in this sentence? Is the [datatype] rdf:XMLLiteral in  
that case, or is the [datatype] unspecified? The question is if  
[datatype] refers to the @datatype attribute here, or to the RDF  
datatype of the resulting RDF node, in the RDF abstract syntax sense.

Hope there's a test case in the suite that answers this question ;-)

Richard



>
>
>
>>
>> 3. Double predicates. Just to confirm, is it always allowed to have
>> multiple CURIEs in the CURIE-accepting properties?
>>
>> rel="foo:prop1 bar:prop2"
>> rev="foo:prop1 bar:prop2"
>> property="foo:prop1 bar:prop2"
>> typeof="foo:prop1 bar:prop2"
>>
>> I assume that all of these are legal and will result in two triples
>> instead of one?
>>
>
> Yes.
>
>>
>> That's all for now. Finally, in case that some of the folks who
>> influenced the design of RDFa on this list: Let me say that I'm
>> impressed with the result.
>
> Thank you!
>
> Ivan
>
>
>>                            Obviously a lot of thought went into every
>> detail of the language and the result is pleasing and elegant.  
>> Finally,
>> here's an RDF syntax that does not suck and makes RDF publishing fun!
>>
>> Cheers,
>> Richard
>>
>
> -- 
>
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
Received on Wednesday, 10 December 2008 17:11:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 December 2008 17:11:13 GMT