Re: ISSUE-29: Re: When is equal and when is it nonequal (eg, the IRI interface)

On Sun, 2010-08-01 at 21:28 -0400, Manu Sporny wrote:
> Unfortunately, I don't think the answer to this one is as simple as
> that, Toby. It assumes that we're operating in a DOM environment,
> which we can't depend on for the RDFa API.
> 
> I've updated the RDFa API spec to move "origin" into a
> developer-modifiable attribute called info. We also had to rename
> "origin" to "source" due to Thomas' input on ISSUE-29. So, the way you
> access the property at the moment is:
> 
> triple.subject.info.source 

What it's called does not matter so much to me. What I'm concerned about
is that the origin is being attached to the IRI, PlainLiteral,
TypedLiteral and BlankNode interfaces when it's more useful if attached
to the RDFTriple interface.

i.e. what we now have, in a JSON-ish notation is something like this for
an RDF triple:

  {
    "subject" : {
          "value"  : "http://tobyinkster.co.uk/#i",
          "origin" : (some node)
          },
    "predicate" : {
          "value"  : "http://xmlns.com/foaf/0.1/name",
          "origin" : (some node)
          },
    "object" : {
          "value"  : "Toby Inkster",
          "origin" : (some node)
          },
  }

Whereas it would be better if it were:

  {
    "subject"   : { "value"  : "http://tobyinkster.co.uk/#i" },
    "predicate" : { "value"  : "http://xmlns.com/foaf/0.1/name" },
    "object"    : { "value"  : "Toby Inkster" },
    "subjectOrigin"   : (some node),
    "predicateOrigin" : (some node),
    "objectOrigin"    : (some node)
  }

Or:

  {
    "subject"   : { "value"  : "http://tobyinkster.co.uk/#i" },
    "predicate" : { "value"  : "http://xmlns.com/foaf/0.1/name" },
    "object"    : { "value"  : "Toby Inkster" },
    "origins"   : {
          "subject"   : (some node),
          "predicate" : (some node),
          "object"    : (some node)
          }
  }

Or even:

  {
    "subject"   : { "value"  : "http://tobyinkster.co.uk/#i" },
    "predicate" : { "value"  : "http://xmlns.com/foaf/0.1/name" },
    "object"    : { "value"  : "Toby Inkster" },
    "origins"   : [(some node), (some node), (some node)]
  }

By moving the origins outside the IRI, PlainLiteral, TypedLiteral and
BlankNode interfaces, it becomes trivial to test for equivalence between
nodes.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 2 August 2010 16:26:30 UTC