Re: SVG12: IRI Processing rules and xlink:href

* Mark Birbeck wrote:
>> >I interpret the specs (SVG 1.2/IRI/URI) to say as follows:
>> >1) xlink:href="" resolves to a reference to the document 
>> >itself (if no other xml:base attribute is explicitly given
>> >in the ancestors to the referencing element).
>You say that this view "is not really correct either":


>> Consider an example like
>>   <!-- document at -->
>>   <g xml:base="">
>>     <image xlink:href="" ... />
>>   </g>

If "resolve" refers to resolving the IRI Reference to an IRI it's not
correct because the document is at and the
reference resolves to and these are different.

If "resolve" refers to dereferencing the reference for retrieval, the
note about xml:base is not correct as the lexical form of the reference
and the "base IRI" do not affect whether a reference is a same-document

>By the way, whilst everyone is going through this clarification
>process, you might also want to say how you view:
>  xlink:href="#"
>This is usually also seen as a reference to the current document.

Well, you simply parse the reference into its components as defined in
RFC 3986

  R.scheme    = undefined
  R.authority = undefined
  R.path      = ""
  R.query     = undefined
  R.fragment  = ""

and apply the relevant algorithm which would execute the instructions

  T.path      = Base.path;
  T.query     = Base.query;
  T.authority = Base.authority;
  T.scheme    = Base.scheme;
  T.fragment  = R.fragment;

The reference would be a same-document reference if Base and T are
equivalent for all attributes but "fragment"; this is obviously true
so this is a same-document reference. If you recompose the reference
you get (Base is "")

or something equivalent to it like

Björn Höhrmann · ·
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · 

Received on Thursday, 9 June 2005 14:11:57 UTC