SVG Firefox 1.5: Hyperlink inside of <text> possible?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SVG Firefox 1.5: Hyperlink inside of <text> possible?

Henning Pingel
Hi,

During some tests with inline SVG I realized that inserting a hyperlink
into a text element does not work with Firefox 1.5 RC1:

<text>This is the example line that contains a
<a xlink:href="targetpage.html">link</a></text>

Also this does not work:

<text>This is the example line that contains a
<a xlink:href="targetpage.html"><tspan>link</tspan></a></text>

Of course it would be possible to do it like this:

<text>This is the example line that contains a</text>
<a xlink:href="targetpage.html"></text>link</text></a>

But I think it should be possible to use the <a> inside of a <text> or
<textspan> according to the SVG specification I have in my bookshelf.

Namespaces are defined correctly in the document I think.

Do you have any advice for me regarding this problem?
Thank you very much in advance!

Best regards,
Henning
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Henning Pingel
Hi,

I searched in Bugzilla and found this interesting bugreport:
https://bugzilla.mozilla.org/show_bug.cgi?id=287252

In the attachment "testcase - svg:text" I saw that the xlink:href
attribute can be used within the <text> tag which I didn't know. So I
tried the following and it worked for me (tested only with Firefox 1.5
RC2 on WinXP):

<text x="50" y="120">This line contains a <tspan
xlink:href="http://www.google.de" xlink:type="simple">link</tspan>. And
it works.</text>

I'm happy I have found a solution but I'm still wondering why the <a>
tag does not work in the same way. I assume this could be a bug.

Best regards,
Henning




Henning Pingel wrote:

> Hi,
>
> During some tests with inline SVG I realized that inserting a hyperlink
> into a text element does not work with Firefox 1.5 RC1:
>
> <text>This is the example line that contains a
> <a xlink:href="targetpage.html">link</a></text>
>
> Also this does not work:
>
> <text>This is the example line that contains a
> <a xlink:href="targetpage.html"><tspan>link</tspan></a></text>
>
> Of course it would be possible to do it like this:
>
> <text>This is the example line that contains a</text>
> <a xlink:href="targetpage.html"></text>link</text></a>
>
> But I think it should be possible to use the <a> inside of a <text> or
> <textspan> according to the SVG specification I have in my bookshelf.
>
> Namespaces are defined correctly in the document I think.
>
> Do you have any advice for me regarding this problem?
> Thank you very much in advance!
>
> Best regards,
> Henning
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Henning Pingel
Well,

it is sadly not a solution. When I click on the word with the link I get
the following error in the Javascript console:

Error: uncaught exception: [Exception... "Component returned failure
code: 0x804b000a [nsIIOService.newURI]"  nsresult: "0x804b000a
(<unknown>)"  location: "JS frame :: chrome://browser/content/browser.js
:: makeURLAbsolute :: line 4797"  data: no]

Henning

Henning Pingel wrote:

> Hi,
>
> I searched in Bugzilla and found this interesting bugreport:
> https://bugzilla.mozilla.org/show_bug.cgi?id=287252
>
> In the attachment "testcase - svg:text" I saw that the xlink:href
> attribute can be used within the <text> tag which I didn't know. So I
> tried the following and it worked for me (tested only with Firefox 1.5
> RC2 on WinXP):
>
> <text x="50" y="120">This line contains a <tspan
> xlink:href="http://www.google.de" xlink:type="simple">link</tspan>. And
> it works.</text>
>
> I'm happy I have found a solution but I'm still wondering why the <a>
> tag does not work in the same way. I assume this could be a bug.
>
> Best regards,
> Henning
>
>
>
>
> Henning Pingel wrote:
>
>> Hi,
>>
>> During some tests with inline SVG I realized that inserting a
>> hyperlink into a text element does not work with Firefox 1.5 RC1:
>>
>> <text>This is the example line that contains a
>> <a xlink:href="targetpage.html">link</a></text>
>>
>> Also this does not work:
>>
>> <text>This is the example line that contains a
>> <a xlink:href="targetpage.html"><tspan>link</tspan></a></text>
>>
>> Of course it would be possible to do it like this:
>>
>> <text>This is the example line that contains a</text>
>> <a xlink:href="targetpage.html"></text>link</text></a>
>>
>> But I think it should be possible to use the <a> inside of a <text> or
>> <textspan> according to the SVG specification I have in my bookshelf.
>>
>> Namespaces are defined correctly in the document I think.
>>
>> Do you have any advice for me regarding this problem?
>> Thank you very much in advance!
>>
>> Best regards,
>> Henning
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Boris Zbarsky
Henning Pingel wrote:
> it is sadly not a solution. When I click on the word with the link I get
> the following error in the Javascript console:
>
> Error: uncaught exception: [Exception... "Component returned failure
> code: 0x804b000a

That's NS_ERROR_MALFORMED_URI for what that's worth.

-Boris
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Henning Pingel
Hi Boris,

Thanks for your answer. I assume that this bugreport of yours covers my
problem: https://bugzilla.mozilla.org/show_bug.cgi?id=314568

Do you know if your correction will bei integrated into Firefox 1.5? Or
is it already in the release candidate?

Or should I add another bug report to Bugzilla?

Best regards,
Henning

Boris Zbarsky wrote:

> Henning Pingel wrote:
>
>> it is sadly not a solution. When I click on the word with the link I
>> get the following error in the Javascript console:
>>
>> Error: uncaught exception: [Exception... "Component returned failure
>> code: 0x804b000a
>
>
> That's NS_ERROR_MALFORMED_URI for what that's worth.
>
> -Boris
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Boris Zbarsky
Henning Pingel wrote:
> Thanks for your answer. I assume that this bugreport of yours covers my
> problem: https://bugzilla.mozilla.org/show_bug.cgi?id=314568

No, it probably does not.  I have no idea what your problem is, truthfully -- I
don't have enough information to go on to tell.  But it's not bug 314568, since
that bug is not about hyperlinks.

> Do you know if your correction will bei integrated into Firefox 1.5?

Bug 314568 is not an issue in Firefox 1.5 -- it's a trunk-only regression.

> Or should I add another bug report to Bugzilla?

Please do, and please cc me on it.  And attach a testcase that shows your problem.

-Boris
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg
Reply | Threaded
Open this post in threaded view
|

Re: SVG Firefox 1.5: Hyperlink inside of <text> possible?

Henning Pingel
Hi Boris,

I have submitted a bug report on Bugzilla
(https://bugzilla.mozilla.org/show_bug.cgi?id=316959) and provided a
testcase on my website:

http://www.henningpingel.de/fileadmin/henning/bugzilla/hyperlinks_in_text_tags.svg

Best regards,
Henning

Boris Zbarsky wrote:
>> Or should I add another bug report to Bugzilla?
>
>
> Please do, and please cc me on it.  And attach a testcase that shows
> your problem.
>
> -Boris
_______________________________________________
Mozilla-svg mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-svg