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

rdfs:XMLLiteral related syntax changes

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Mon, 28 Oct 2002 13:53:37 +0000
To: w3c-rdfcore-wg@w3.org
Message-ID: <18894.1035813217@hoth.ilrt.bris.ac.uk>


Given that we now have turned the XML literals into a single special
case datatype rdfs:XMLLiteral, there are now two ways to express the
same thing in N-Triples and RDF/XML.  I'd prefer if there was only
one, to remove ambiguity of what is being described.


As an example, the XML Literal with the value <a>blah</a> is
currently written in RDF/XML and N-Triples as: 

  <ex:prop rdf:parseType="Literal"><a>blah</a></foo:prop>

  _:a ex:prop  xml"<a>blah</a>" .

but now this just a datatype with a datatype URI of rdfs:XMLLiteral
then maybe this is allowed:

  <ex:prop rdf:datatype="&rdfs;XMLLiteral">&lt;a&gt;blah&lt;/a&gt;</foo:prop>

If this is not allowed, and I suspect not, then rdf:datatype should
be forbidden from having the value &rdfs;XMLLiteral.

Similarly, the datatype URI rdfs:XMLLiteral is forbidden, i.e:
  _:a ex:prop  "<a>blah</a>"^^rdfs:XMLLiteral .

For N-Triples, the xml"<a>blah</a>" N-Triples form could be removed since

  _:a ex:prop  "<a>blah</a>"^^rdfs:XMLLiteral .

now allows the same thing to be expressed.  This would make XML
literals have no special form in N-Triples, which would match what is
happening in the abstract syntax, the formal model and also make it
easier (I suspect) for N3 systems to support it.


Summary of two proposals:

 1) Forbid rdf:datatype="&rdfs;XMLLiteral" in RDF/XML 

    Pros: not a natural way to encode XML in RDF/XML
          parseType="Literal" isn't going away
          two ways to encode the same thing

    Cons: an additional a special case in the RDF/XML syntax

 2) Remove the xml"<a>foo</a>" form in N-Triples

    Pros: rdfs:XMLLiteral is a datatype and should use the datatype form
          two ways to encode the same thing

    Cons: this is a special case datatype, better to make this clear

Dave
Received on Monday, 28 October 2002 08:54:26 EST

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