Re: xlink

On Friday, June 27, 2003, 5:02:55 AM, Sigurd wrote:


SL> Hello,

SL> Is specifying the xlink prefix with a namespace uri with xmlns optional in
SL> svg? On the adobe site, there are a lot of svg files which use xlink:href
SL> without first declaring xmlns:xlink=http://www.w3.org/1999/xlink

It used to be optional in early drafts of the SVG spec because the
prefix was declared in the DTD.

We were told not to do that during review by the XML groups so, yes,
the xlink (and scg) namespaces must be declared in SVG content.

The Adobe viewer covers a lot of different drafts, so tries to cope
with older content (its not clear that is a good idea at this stage).
However, it is using the definition in the DTD in that case. You can
check this by

a) declaring the xlink namespace with a different prefix, like foo
  xmlns:foo="http://www.w3.org/1999/xlink"
  and using foo:href will still work

b) declaring the xlink namespace with the wrong URI
  xmlns:xlink="http://example.com/wrongURI"
  now your links have stopped working.

-- 
 Chris                            mailto:chris@w3.org

Received on Friday, 27 June 2003 11:06:47 UTC