Re: xml:base irrelevant to same document reference

Bill Kearney wrote:
>><p xml:base="http://www.example.org/foo"><a name="xyzzy"/></p>
>><p xml:base="http://www.example.org/bar"><a href="#xyzzy"/></p>
>>
>>Even with the proposed RFC2396 revision, the second href will refer to
>>the first href (at least I think so), whereas in the analagous case in
>>RDF it will not.  Surely there is something wrong somewhere if XHTML and
>>RDF behave inconsistently in this respect. And I have never come across
>>another XML vocabulary that scopes IDs to the current base URI.
> 
> 
> But isn't this mixing two different things?
> 
> Something looking for the "fragment named xyzzy" would properly see the first
> one.  Your use of an HREF doesn't really affect things in an RDF sense.  Or does
> it?  Isn't the concatenation of a URI and it's rdf:ID the only relevent
> combination from an RDF/XML serialization aspect?
> 
> Or am I missing yet another startlingly unexpected aspect of RDF serialized in
> XML?

I think the things work is unexpected to somebody with at XML background 
(at least it is unexpected to me).  I was thinking of rdf:ID as working 
something like an ID attribute in XML or <a name="..."/> in HTML, but it 
seems that's the wrong way to think of it.     Let me try to test my 
understanding.  When you use rdf:about="#foo", there is no constraint 
that there be a matching rdf:ID="foo" anywhere; rdf:ID="foo" is just an 
abbrevation for rdf:about="#foo" with the constraint that there not be 
two rdf:ID's in a single document that expand to the same absolute URI. 
  Also rdf:ID works totally differently from rdf:nodeID:

- rdf:ID is relative to the base URI where rdf:nodeID isn't;

- with rdf:nodeID, you can have multiple occurrences with the same 
value, but with rdf:ID you cannot;

- to refer something with a rdf:ID you use a different attribute, namely 
rdf:about; to reference something with a rdf:nodeID, you use another 
rdf:nodeID attribute

So not only to rdf:ID and rdf:nodeID work in totally different ways, but 
also neither of them work the same as the traditional XML ID/IDREF or 
the HTML <a name="..."/>/<a href="..."/> mechanisms.  Is that correct?

James

Received on Sunday, 15 June 2003 23:40:55 UTC