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

Re: NTriples proposed changes summary

From: Tim Berners-Lee <timbl@w3.org>
Date: Fri, 15 Mar 2002 16:50:01 -0500
Message-ID: <02f501c1cc6b$5b9e42f0$9601a8c0@CREST>
To: "Dave Beckett" <dave.beckett@bristol.ac.uk>, "Graham Klyne" <Graham.Klyne@MIMEsweeper.com>
Cc: <w3c-rdfcore-wg@w3.org>

----- Original Message -----
From: "Graham Klyne" <Graham.Klyne@MIMEsweeper.com>
To: "Dave Beckett" <dave.beckett@bristol.ac.uk>
Cc: <w3c-rdfcore-wg@w3.org>; "Tim Berners-Lee" <timbl@w3.org>
Sent: Friday, March 15, 2002 7:57 AM
Subject: Re: NTriples proposed changes summary

> 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).

FWIW, The encoding of XML IDs which contain "-" is done by encoding them
into "__"
This is described in http://www.w3.org/DesignIssues/Notation3.html#munging.
The same might be appropriate here.

Alternatively (and nicer IMHO) is that,
as these ISO codes which alas do not have a home on the web should have a
declared for them which is defined to have the set of identifiers
which are the ISO language codes with "_" instead of "-".
(If the ISO folks have used both such that ambiguity arises, I will
[make them] eat my hat ;-)

> 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
> at the start of a statement.  For greater safety, maybe reserve 'xml' and
> 'lit' as keywords?

I am thinking more of a language syntax clash.
Currently,    lit("aa","bb")  is a symbol folllowed by a list of two

What I would be very happy to do in N3, would
be to introduce an operator for application of a property (graph
traversal).  I have been thinking of "." for forward traversal and
"^" for backward.  If the language property has, as subject, the value
and, as object, the string, then the value which is
a language operated on would be a reverse traveral.
So a shorthand N3 notation for it could be


If you wanted to steer clear of possible N3 use to distinguish between
a real property and a special form of literal, then you could use "^^"
in that it would never turn up as a valid combination, and could be
parsed by N3 parsers  either a specical literal constructor,
or as ^.

In any event, I don't much like the idea of identifiers cropping
up unless they are in a namespace or they are just strings, for
reasons which will be motherhood and apple pie to this group!
So squeezing in a "lang:" cheers me up no end.


PS: FoR longer brainstorming on graph traversal syntax (RDFPath 1.0 ;-)
see http://www.w3.org/DesignIssues/N3Alternatives.html

PPS: n functional syntax, One option is to force a space betwen a symbol and
() and use
conventional function notation:

      nt:lit("foo" "bar")        ===    [ is  lit of ("foo" "bar")]

That is quite hairy as the space is a weaknesss -- terribly easy to get it
(a b(b d)e)  and (a b (c d) e)  look awful similar!

Note N3 lists like lisp lists have no ","
> 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 16:50:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:11 UTC