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

RE: RDF/A and xml:lang on XMLLiterals

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Wed, 27 Oct 2004 11:02:15 +0100
To: "'Jeremy Carroll'" <jjc@hplb.hpl.hp.com>
Cc: "'public-rdf-in-xhtml-tf'" <public-rdf-in-xhtml-tf@w3.org>
Message-ID: <009201c4bc0c$0d2ae180$6701a8c0@W100>

Jeremy,

I have to say that I disagree with this.

Firstly, I think it's incorrect to insert <span> elements since:

 (i)  That isn't what the author asked for.
 (ii) It implies knowledge of the language hosting RDF/A (your
      approach would fail if RDF/A were used in SVG or VoiceXML).

Secondly, what you describe is only a problem with XML literals. We already
have a mechanism for addressing examples 'b', 'c', and 'd', and for 'f' you
could just place @xml:lang on the inner span. So the only things we can't do
are 'a' and 'e', which as far as I can see is because we are unable to do
this:

  <http://example.org/doc> dc:creator "Luigi
<em>Rossi</em>"^^rdf:XMLLiteral@it .

That seems to me to be a 'restriction' imposed by RDF, and so is not
something that we should be trying to address by adding things that the
author did not actually put in.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/

Download our XForms processor from
http://www.formsPlayer.com/

> -----Original Message-----
> From: public-rdf-in-xhtml-tf-request@w3.org 
> [mailto:public-rdf-in-xhtml-tf-request@w3.org] On Behalf Of 
> Jeremy Carroll
> Sent: 26 October 2004 15:58
> To: public-rdf-in-xhtml-tf
> Subject: RDF/A and xml:lang on XMLLiterals
> 
> 
> 
> One of the concerns I raised last week was to do with the 
> forgetting of 
> lang.
> 
> I think this issue is one where it is worth trying to get a 
> TF agreement 
> on, and hence make a formal comment.
> It is worth remembering that the I18N and RDF Core WGs fell 
> out over this.
> 
> I'll start with a possible formal comment, consisting of test 
> cases, and 
> then some discussion.
> I suspect that e-mail follow up should first address 
> discussion points, 
> and when/if we reach consensus on that, we can then see what should 
> happen to the comment.
> 
> proposed comment
> [[
> The RDF-in-XHTML TF suggests that the RDF triple corresponding to:
> 
> a)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi <em>Rossi</em></meta> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'>Luigi <em>Rossi</em></span>"^^rdf:XMLLiteral .
> 
> 
> b)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> 
> c)
> 
> <head xml:lang="" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang=''>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> d)
> 
> <head xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang=''>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> 
> e)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator"><em>Luigi Rossi</em></meta> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'><em>Luigi Rossi</em></span>"^^rdf:XMLLiteral
> 
> f)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator"
>    ><span class="red">Luigi Rossi</span></meta>
> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'><span class='red'>Luigi Rossi</span></span>" 
> ^^rdf:XMLLiteral
> 
> (In all cases the XML Literal is understood as being in exclusive 
> canonical XML, and having the XHTML2 default namespace)
> ]]
> 
> 
> Discussion:
> 
> a)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi <em>Rossi</em></meta> </head>
> 
> The object has to be an rdf:XMLLiteral because it includes 
> markup. The object of the triple should include the lang 
> information, which gets 
> deleted in the current document. Since there is no where to 
> put it, we 
> have to add a span element to get
> 
> "<span xml:lang='it'>Luigi <em>Rossi</em></span>"^^rdf:XMLLiteral .
> 
> 
> b)
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> for consistency with a) we get the datatype of 
> rdf:XMLLiteral, and then 
> by the same argument as in a) we introduce a <span> element 
> to carry the 
> xml:lang attribute.
> 
> 
> "<span xml:lang='it'>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> 
> 
> 
> c)
> 
> Even if the lang is explicitly empty, we could follow the 
> same approach 
> as in a)
> 
> <head xml:lang="" xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> should be
> 
> "<span xml:lang=''>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> 
> d)
> 
> No lang and an empty lang are treated the same.
> 
> <head xml:base="http://example.org/doc">
>    <meta property="dc:creator">Luigi Rossi</meta>
> </head>
> 
> should be
> 
> "<span xml:lang=''>Luigi Rossi</span>"^^rdf:XMLLiteral .
> 
> e)
> I think for simplicity it is better to always introduce the new span 
> element, even if there is a convenient element on which an xml:lang 
> could hang.
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator"><em>Luigi Rossi</em></meta> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'><em>Luigi Rossi</em></span>"^^rdf:XMLLiteral
> 
> f)
> even if the convenient element is itself a span.
> 
> <head xml:lang="it" xml:base="http://example.org/doc">
>    <meta property="dc:creator"
>    ><span class="red">Luigi Rossi</span></meta>
> </head>
> 
> should be
> 
> <http://example.org/doc> dc:creator
> "<span xml:lang='it'><span class='red'>Luigi Rossi</span></span>" 
> ^^rdf:XMLLiteral
> 
> 
> =====
> 
> 
> Further discussion
> 
> In my examples I assumed that various html 4 features are still in 
> xhtml2, please correct me where I am wrong.
> I assume that the lang attribute has been replaced by the xml:lang 
> attribute in xhtml2.
> 
> Jeremy
> 
> 
> 
Received on Wednesday, 27 October 2004 10:03:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:59 GMT