NTriples proposed changes summary

We have to get this closed since without the format capable of
recording any decisions on literals, XML formating and languages, we
cannot close them and update the WDs in the light of the closed
issues.

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


The proposed change is to production
  http://www.w3.org/TR/rdf-testcases/#literal

changing it to

  literal  ::=  langString | xmlString

and adding new productions:

  langString   ::= '"' string '"' ('-' language)

  xmlString    ::= 'xml' langString

  language     ::= character+  excluding '.' and ws

    Any allowed xml:lang content as defined in
    http://www.w3.org/TR/REC-xml#sec-lang-tag


I enclose some examples taken from my test suite for my N-Triples
parser; CVS copy is at
  http://cvs.ilrt.org/cvsweb/redland/raptor/tests/test.nt

Although spaces before the final '.' are optional, I've not got tests
for that just yet.

Dave

--
# 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> "chat"-fr .
<http://example.org/resource31> <http://example.org/property> "chat"-en .

Received on Friday, 15 March 2002 06:27:18 UTC