W3C home > Mailing lists > Public > www-svg@w3.org > June 2005

Re: SVG12: IRI Processing rules and xlink:href

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 09 Jun 2005 16:12:45 +0200
To: "Mark Birbeck" <mark.birbeck@x-port.net>
Cc: <www-svg@w3.org>
Message-ID: <42bd49c1.73736046@smtp.bjoern.hoehrmann.de>

* 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 http://example.org/svg/svg -->
>>   <g xml:base="http://example.org/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 http://example.org/svg/svg and the
reference resolves to http://example.org/base 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 "http://example.org/foo")


or something equivalent to it like

Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 9 June 2005 14:11:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:06 UTC