W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > February 2002

Re: xml:lang [was Re: Outstanding Issues ]

From: Dan Connolly <connolly@w3.org>
Date: 27 Feb 2002 10:41:40 -0600
To: Pat Hayes <phayes@ai.uwf.edu>
Cc: Brian McBride <bwm@hplb.hpl.hp.com>, w3c-rdfcore-wg@w3.org
Message-Id: <1014828101.1042.38.camel@jammer>
On Wed, 2002-02-27 at 10:25, Pat Hayes wrote:
> >At 11:02 12/02/2002 +0200, Patrick Stickler wrote:
[...]
> >I read M&S and it said that language is part of the literal, so that 
> >is how I wrote the code.  In Jena, a literal is a pair, as defined 
> >in M&S.
> 
> Well, Brian, surely you might have mentioned this before,

As I said before, several folks did mention it a long time
ago, but after while, we got tired of saying "string
or string with lang or XML thingy" and just said string.

I was pretty careful to be sure the way we resolved
the lang issue doesn't matter to the model theory.

To the model theory, a literal is still just a string. We can
encode two strings in one, after all, no? Here's the
n-triples design DaveB and I kicked around after the meeting:

	("abc", 'en') ->	"abc"-en
	("abc",  none) ->	"abc"
	("abc", 'fr') ->	"abc"-fr

Also, for XML literals, we'll have xml("canonical-form...", "en").

The point is: the literal is syntactically evident in the RDF document.

> when the 
> datatyping discussion was in full progress, all predicated on the 
> assumption (and indeed the frequent explicit assertion, to which 
> nobody raised the slightest objection) that literals were strings. If 
> literals are not strings, then we have to go and do all that again, 
> because NONE of it makes any sense at all. What is the result of 
> applying the lexical-to-value mapping of xsd:number to the pair 
> ("34", "french") ?

same as the result of applying it to "blarf": you lose.

> >A good reason might have the form "If we do it as m&s says, problem x occurs".
> 
> Well, one problem for us is that we will have to re-open the 
> datatyping discussion again from square one.

I don't think so.

> For example, if literals 
> can be pairs, then we could put the datatype name in the second slot 
> of the pair,

no... the pair comes from RDF/XML syntax.

Eventually, you're going to have to take a peek at the syntax, Pat. ;-)

For the examples above, that's:

	<rdf:Description rdf:about="http://example/something">
          <dc:title xml:lang="en">abc</dc:title>
	</rdf:Description>

becomes

<http://example/something> <http://purl.org/dc/elements/1.1/title>
"abc"-en.

If you want to muck with things in n-triples, you have to reflect
them back into RDF/XML.

> - a solution which I believe was considered, but 
> rejected on the grounds that literals were NOT pairs, as I recall.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 27 February 2002 11:42:44 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:45:20 EDT