W3C home > Mailing lists > Public > public-rdf-comments@w3.org > May 2013

RE: Format of fragment identifier

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Fri, 31 May 2013 22:47:44 +0200
To: "'Hans Teijgeler'" <hans.teijgeler@quicknet.nl>
Cc: <public-rdf-comments@w3.org>
Message-ID: <020b01ce5e40$1aa630a0$4ff291e0$@lanthaler@gmx.net>
On Friday, May 31, 2013 10:08 PM, Hans Teijgeler wrote:
> Hi Markus,
> Thank you, but too technical :(


> Example from the triple store:
> http://www.xyz-corp.com/lifecycledata#T13b25ba6-7940-11e2-b92a-
> 0800200c9a66
> Is that T after the # necessary?

As I said, it depends. In Turtle

  @base <http://www.xyz-corp.com/lifecycledata> .
  @prefix lcd: <http://www.xyz-corp.com/lifecycledata#> .
  @prefix ex: <http://example.com/> .

  <#13b25ba6-7> ex:worksJustAsThisDoes lcd:13b25ba6-7

or JSON-LD you never need to add a letter:

    "@context": {
      "@base": "http://www.xyz-corp.com/lifecycledata",
      "lcd" "http://www.xyz-corp.com/lifecycledata#"
      "worksJustAsThisDoes": {
         "@id": "http://example.com/xy", "@type": "@id" }
    "@id": "#13b25ba6-7",
    "worksJustAsThisDoes": "lcd:13b25ba6-7"

In RDF/XML it is not necessary if you use a relative IRI as in

  <?xml version="1.0"?>
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    <rdf:Description rdf:about="#13b25ba6-7">
      <ex:prop>This is OK, but the next property is not</ex:prop>

but it you cannot abbreviate such a URI using a prefix as in

      <lcd:1234>in XML the suffix cannot start with a number</ex:1234>


as the suffix (the 1234 in the example above) must start with a letter or an

Hope this clarifies things,

Markus Lanthaler
Received on Friday, 31 May 2013 20:48:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:34 UTC