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

Re: NTriples proposed changes summary

From: Graham Klyne <Graham.Klyne@MIMEsweeper.com>
Date: Fri, 15 Mar 2002 12:57:10 +0000
Message-Id: <5.1.0.14.2.20020315124625.039cc1e0@joy.songbird.com>
To: Dave Beckett <dave.beckett@bristol.ac.uk>
Cc: w3c-rdfcore-wg@w3.org, Tim Berners-Lee <timbl@w3.org>
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.  For greater safety, maybe reserve 'xml' and 
'lit' as keywords?


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>
Received on Friday, 15 March 2002 07:54:27 EST

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