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

Re: NTriples proposed changes summary

From: Dan Connolly <connolly@w3.org>
Date: 15 Mar 2002 08:20:48 -0600
To: Graham Klyne <Graham.Klyne@MIMEsweeper.com>
Cc: Dave Beckett <dave.beckett@bristol.ac.uk>, w3c-rdfcore-wg@w3.org, Tim Berners-Lee <timbl@w3.org>
Message-Id: <1016202049.5227.820.camel@dirk>
On Fri, 2002-03-15 at 06:57, Graham Klyne wrote:
> At 11:27 AM 3/15/02 +0000, Dave Beckett wrote:
> >So although Tim has raised a problem with using '-' in the proposed
> >changes, I feel we should make this change for now.  We can revisit
> >this later and tweak the format again if and when we get a better way
> >to resolve this encoding of lang-strings (or we make some other change).
> 
> I don't feel strongly about this, but in view of Tim's comment would offer 
> this suggestion (for use now, later or never):
> 
>    literal  ::=  plainstring | langString | xmlString
> 
>    plainstring   ::= '"' string '"'
> 
>    langString   ::= 'lit(' '"' string '"' ',' language ')'
> 
>    xmlString    ::= 'xml(' '"' string '"' (',' language)? ')'
> 
>    language     ::= character+  excluding ',', '(', ')' and ws
> 
> I think this avoids confusion with N3 (...) because N3 syntax has that only 
> at the start of a statement.

???

This is syntactically-happy N3:

  (:foo :bar) :color "blue".

Meanwhile, N3 syntax has ( only at the start of a *term*,
so your proposal still seems viable, to me.

Meanwhile, I evidently don't speak for "the N3 developers";
I thought the earlier proposals (which TimBL didn't like)
were fine.


>  For greater safety, maybe reserve 'xml' and 
> 'lit' as keywords?

yes, that would be the net effect.

For that reason, "lit" seems like a bit of a misnomer.
langString("abc", en) is more like it.
or withLang("abc", en). or some such.

> The test cases then become:
> 
> # XML literals
> <http://example.org/resource21> <http://example.org/property> xml("") .
> <http://example.org/resource22> <http://example.org/property> xml(" ") .
> <http://example.org/resource23> <http://example.org/property> xml("x") .
> <http://example.org/resource23> <http://example.org/property> xml("\"") .
> <http://example.org/resource24> <http://example.org/property> xml("<a/>") .
> <http://example.org/resource25> <http://example.org/property> xml("a <b/>") .
> <http://example.org/resource26> <http://example.org/property> xml("a 
> <b></b> c") .
> <http://example.org/resource26> <http://example.org/property> 
> xml("a\n<b></b>\nc") .
> <http://example.org/resource27> <http://example.org/property> xml("chat") .
> <http://example.org/resource28> <http://example.org/property> xml("chat",fr) .
> <http://example.org/resource29> <http://example.org/property> xml("chat",en) .
> 
> # literals with languages
> <http://example.org/resource30> <http://example.org/property> lit("chat",fr) .
> <http://example.org/resource31> <http://example.org/property> lit("chat",en) .
> 
> 
> (Non-language, non-XML literals are unchanged.)
> 
> #g
> 
> 
> -------------------
> Graham Klyne
> <GK@NineByNine.org>
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Friday, 15 March 2002 09:41:13 EST

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