Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > SVG and HTML links

Reply
Thread Tools

SVG and HTML links

 
 
Richard
Guest
Posts: n/a
 
      11-01-2004
I have a SVG document with links out to html pages which works when
you run the SVG file i have tried to intergrate it into a coldfusion
page and the links no longer work.

The SVG file is :

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="250" height="250">
<a xlink:href="http://www.google.com">
<rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30" y="30"
width="100" height="100"/>
</a>
<a xlink:href="http://www.yahoo.com">
<text fill="#000000" stroke="#000000" stroke-width="0" font-size="24"
font-family="@MS Mincho" x="30px" y="163px">Link to
yahoo</text>
</a>
</svg>

If you double click the file it opens in IE and works fine, but when i
copied the above code into a coldfusion page and added the usual
namespace code:

<html xmlns:svg="http://www.w3.org/2000/svg">
<object id="AdobeSVG"
classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>

Then modifed the code to include the <svg: tag it no longer works, the
code is below:

<svg:svg width="250" height="250">
<svg:rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30"
y="30"
width="100" height="100"/>
<svg:a xlink:href="http://www.google.com">
<svg:rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30"
y="30"
width="100" height="100"/>
</svg:a>
<svg:a xlink:href="http://www.yahoo.com">
<svg:text fill="#000000" stroke="#000000" stroke-width="0"
font-size="24"
font-family="@MS Mincho" x="30px" y="163px">Link to yahoo</svg:text>
</svg:a>
</svg:svg>

Any ideas why the links don't work when i intergrate the code into the
CFM page?

Regards

Richard
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      11-01-2004


Richard wrote:

> I have a SVG document with links out to html pages which works when
> you run the SVG file i have tried to intergrate it into a coldfusion
> page and the links no longer work.
>
> The SVG file is :
>
> <?xml version="1.0"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
> <svg width="250" height="250">
> <a xlink:href="http://www.google.com">
> <rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30" y="30"
> width="100" height="100"/>
> </a>
> <a xlink:href="http://www.yahoo.com">
> <text fill="#000000" stroke="#000000" stroke-width="0" font-size="24"
> font-family="@MS Mincho" x="30px" y="163px">Link to
> yahoo</text>
> </a>
> </svg>
>
> If you double click the file it opens in IE and works fine, but when i
> copied the above code into a coldfusion page and added the usual
> namespace code:
>
> <html xmlns:svg="http://www.w3.org/2000/svg">
> <object id="AdobeSVG"
> classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
> <?import namespace="svg" implementation="#AdobeSVG"?>
>
> Then modifed the code to include the <svg: tag it no longer works, the
> code is below:
>
> <svg:svg width="250" height="250">
> <svg:rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30"
> y="30"
> width="100" height="100"/>
> <svg:a xlink:href="http://www.google.com">
> <svg:rect fill="#00ffff" stroke="#000000" stroke-width="0" x="30"
> y="30"
> width="100" height="100"/>
> </svg:a>
> <svg:a xlink:href="http://www.yahoo.com">
> <svg:text fill="#000000" stroke="#000000" stroke-width="0"
> font-size="24"
> font-family="@MS Mincho" x="30px" y="163px">Link to yahoo</svg:text>
> </svg:a>
> </svg:svg>
>
> Any ideas why the links don't work when i intergrate the code into the
> CFM page?


What about the xlink namespace, don't you need to declare that too?

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: svg-chart 1.1 SVG Charting Library Helmut Jarausch Python 0 05-20-2008 11:05 AM
svg to svg saving problem milof83 Java 1 08-18-2006 07:36 PM
[SVG] probleme dessin d'images SVG avec Batik Mardagg Java 0 05-12-2006 02:13 PM
[SVG] problem with SVG image drawing with Batik Library Mardagg Java 0 05-12-2006 02:12 PM
[SVG] using image-tag to integrate SVG in SVG Arne Nordmann XML 0 06-28-2004 01:16 PM



Advertisments