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

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

From: Ivan Herman <ivan@w3.org>
Date: Mon, 15 Dec 2008 13:14:58 +0100
Message-ID: <49464A42.3010102@w3.org>
To: Mark Birbeck <mark.birbeck@webbackplane.com>
CC: Toby A Inkster <tai@g5n.co.uk>, public-rdfa@w3.org, RDFa <public-rdf-in-xhtml-tf@w3.org>
Mark,

I do not think we disagree. I remember we discussed this issue sometimes
early this year, and it seems that my memory failed me when I
implemented the current model.

However, it would still be good to have official test cases added to the
test suite to clearly document the issues.

Ivan

Mark Birbeck wrote:
> Hi Ivan,
> 
> Toby is right here, that a shorthand for expressing XML literals (and
> consequently turning off recursion) is to have no @datatype value, and
> to have non-text child nodes. For example, the following generates only
> one triple:
> 
>   <div property="my:template">
>     <span property="foaf:name">${name}</span>
>   </div>
> 
> and is equivalent to:
> 
>   <div property="my:template" datatype="rdf:XMLLiteral">
>     <span property="foaf:name">${name}</span>
>   </div>
> 
> Note that the former doesn't require the RDF namespace to be declared.
> 
> If we want the 'nested' predicates to be processed, we have a couple of
> choices. If the text nodes of all child elements will appear as part of
> the value of the predicate, then we can force a non-XMLLiteral datatype.
> In this example, we force the data to be a plain literal:
> 
>   <div property="foaf:name" datatype="">
>     <span property="foaf:givenname">Ivan</span>
>     <span property="foaf:surname">Herman</span>
>   </div>
> 
> Which generates:
> 
>   <> foaf:name "Ivan Herman" .
>   <> foaf:givenname "Ivan" .
>   <> foaf:surname = "Herman" .
> 
> Alternatively, if there is no relationship between the document
> hierarchy and the values, then we could use @content:
> 
>   <div property="foaf:name" content="Ivan Herman">
>     <span property="foaf:surname">Herman</span>,
>     <span property="foaf:givenname">Ivan</span>
>   </div>
> 
> This allows recursion to continue, but also sets the value of foaf:name
> independently of any child elements.
> 
> Regards,
> 
> Mark
> 
> On Mon, Dec 15, 2008 at 5:17 AM, Ivan Herman <ivan@w3.org
> <mailto:ivan@w3.org>> wrote:
> 
> 
> 
>     Toby A Inkster wrote:
>     >
>     > Ivan Herman wrote:
>     >
>     >> Ben, Mark, Michael, others: what do you think?
>     >
>     > My understanding of the syntax specification is that conforming
>     > implementations must generate both triples in your example.
>     >
> 
>     I begin to yield to the fact that I have a bug in distiller on this...
>     But I would still want to have a formal confirmation before I change my
>     code!
> 
> 
>     > Another test which I think is missing from the suite is:
>     >
>     > <div property="ex:foo">
>     >   <span property="ex:bar">bar</span>
>     > </div>
>     >
>     > should generate an XMLLiteral for ex:foo, but there should be no
>     ex:bar
>     > triple.
> 
>     Yes, you are right! That is another case to consider through a
>     proper test.
> 
>     Thanks
> 
>     Ivan
> 
>     >
>     > Also, may I draw attention to this again:
>     >
>     http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2008Dec/0012.html
>     >
>     >
> 
>     --
> 
>     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
> 
> 
> 
> 
> -- 
> Mark Birbeck, webBackplane
> 
> mark.birbeck@webBackplane.com
> 
> http://webBackplane.com/mark-birbeck
> 
> webBackplane is a trading name of Backplane Ltd. (company number
> 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
> London, EC2A 4RR)

-- 

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 Monday, 15 December 2008 12:15:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:59 UTC