Re: RDFa without using xmlns:

Hi Martin,

> [...]
>
> and if you combine my example (+ your suggestions )  with yours .....
>
> {
>   namespace: {
>     foaf: "http://xmlns.com/foaf/0.1/",
>     dc: "http://purl.org/dc/elements/1.1/"
>   },
>   context: {
>     base: "http://example.org/about",
>     token: {
>       title: "dc:title",
>       maker: "foaf:maker",
>       name: "foaf:name",
>       homepage: "foaf:homepage"
>     }
>   }
> }
>
Oops...sorry...I haven't explained it very well.

My 'token' value is playing exactly the same role as your 'namespaces'
value. So I'm suggesting that for the JSON serialisation of prefix
mappings, we actually use RDFj.

Some justifications are:

1. We don't use the idea of namespaces in RDFa -- they are prefix
mappings. So we wouldn't want to use the term 'namespaces'.

2. The notion of a 'token' is more general than simply a prefix
mapping, as argued for in my blog post earlier in the year, on
'Tokenising the Semantic Web'.

3. Making 'token' an object within 'context' (rather than on its own),
creates the possibility of having other context information, such as a
base URL.

It's also possible to abbreviate it; a technique I have used a lot in
my RDFa library is to allow the parent of an object to omitted. So
although the general syntax is this:

  {
    context: {
      token: { ... }
    }
  }

we could easily allow this, as well:

  {
    token: { ... }
  }

4. RDFj already exists.


So, to clarify my point, your example:

  {
    namespace: {
      foaf: "http://xmlns.com/foaf/0.1/",
      dc: "http://purl.org/dc/elements/1.1/"
    }
  }

would become this, when expressed in RDFj:

  {
    context:
      token: {
        foaf: "http://xmlns.com/foaf/0.1/",
        dc: "http://purl.org/dc/elements/1.1/"
      }
    }
  }

And if we allowed the abbreviation, it could become this:

  {
    token: {
      foaf: "http://xmlns.com/foaf/0.1/",
      dc: "http://purl.org/dc/elements/1.1/"
    }
  }

Regards,

Mark

--
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)

Received on Monday, 7 December 2009 22:53:52 UTC