0

In HTML if i want to do a link, i write:

 <a href="http://www.example.com">...</a>

To do an anchor i write:

 <a name="anchor">...</a>

And to do a link i write:

 <a href="http://www.example.com#anchor">...</a>

But with SVG (and so with XLINK, XPOINTER) is very difficult:

 <a xlink:href="http://www.example.com" xlink:show="new">...</a>

but if i write:

 <a xlink:href="http://www.example.com#anchor" xlink:show="new">...</a>

The page opened, is only .com, not example.com#anchor, maybe is there a mistake? And in the xlink, to do an anchor, must added ID ?

Thanks

Borja
  • 3,359
  • 7
  • 33
  • 66
  • i expect that the document it will open centred in the anchor. In html if i open a link with anchor, the page that i see it will not be centred on the top but on the anchor... but why i can't open a link with anchor ? www.example.com/example#anchor ? – Borja Jan 23 '15 at 11:10
  • That's not how SVG works though. http://www.w3.org/TR/SVG/linking.html#Links – Robert Longson Jan 23 '15 at 11:27
  • And how is possible to do a link anchor? – Borja Jan 23 '15 at 16:37
  • SVG doesn't have them in the same way as html, read the spec. – Robert Longson Jan 23 '15 at 17:13
  • Yes i read, but i think that there will be a way... No? – Borja Jan 23 '15 at 17:51
  • OK, what way does the specification say? You can create a view or a viewSpec did you have something else in mind? – Robert Longson Jan 23 '15 at 20:51
  • Ahhh is good idea, i didn't know the svg view spec (with the viewbox)... Tomorrow i will try... But the view spec is for the same file svg, but if i want open website link (with anchor), it isn't open at anchor... Do you understand? – Borja Jan 23 '15 at 23:38
  • I understand and disagree. – Robert Longson Jan 23 '15 at 23:43
  • Where are you in disagree? To use a view spec for open a part of document, or to found a way to open a link web site with anchor? Sorry, but i hope that you help me... A i'm italian and for me is very diffucult speak e understand in english, but in italian web there is NOTHING about xlink – Borja Jan 24 '15 at 09:12

0 Answers0