- From: Nathan <nathan@webr3.org>
- Date: Fri, 05 Nov 2010 16:14:43 +0000
- To: Ian Davis <lists@iandavis.com>
- CC: Leigh Dodds <leigh.dodds@talis.com>, Dave Reynolds <dave.e.reynolds@gmail.com>, "public-lod@w3.org" <public-lod@w3.org>
Ian Davis wrote:
> On Fri, Nov 5, 2010 at 3:29 PM, Nathan <nathan@webr3.org> wrote:
>> Better clear that up, noticed that it's an age old XHTML-RDFa potential
>> issue, so I'll see if we can get it covered in the WG and relay back to the
>> TAG to hopefully clear the issue.
>
> Suppose I assign the ID 'mars' to represent the planet mars in my RDFa
> document. I can then refer to it using http://example.com/foo#mars.
> What does it mean when my javascript calls
> document.getElementById('mars')? Should I expect now to manipulate the
> planet mars?
Ian..
See if you can find a mention of @id in either:
http://www.w3.org/TR/rdfa-syntax/
http://www.w3.org/TR/rdfa-core/
RDFa doesn't use @id.
However, to address the non existent issue as if it did exist.
HTML is an AST which encodes a DOM, the @id is an attribute which is to
be applied to the DOM element in the DOM, in memory. User agents which
use display the DOM use @id to reference the element, and via several
forms of indirection they will often align the view of a document to the
element with that @id if it's requested to do so. It so happens that
User Agents will display this @id appended to the main document URI in
the statues bar of the User Agent (possibly) when it does this. I can
assure you, you've not just minted a URI.
As for javascript document.getElementById('mars'), as explain above all
you're doing is pulling an object from memory which has an id attribute
specified in an AST applied to it. How that relates to URIs or to us on
the semantic web I'm unsure.
Now, let's just suppose that RDFa did use @id - well, what would happen
is an RDFa processor would analyse the DOM document (not the HTML
document, nor the AST) and when it found an @id it would combine the
string lexical form of it, with the string lexical form of the relevant
base, then create an IRI compatible RDF URI Reference out of it, then it
would keep hunting down the DOM using the processing rules, and maybe it
would find enough attributes to find a statement which is encoded in the
document, this may comprise of other RDF URI References or Plain /
Literals, and then finally you'll get some RDF to work with. You may
notice that the RDF URI Reference isn't even in the document (HTML, AST
or DOM) - and certainly isn't in the @id.
But remember, RDFa doesn't use @id, nor does HTML have RDF URI
References in it ;)
Best,
Nathan
Received on Friday, 5 November 2010 16:16:00 UTC