Hi 
I am new to SVG. I am generating SVG file from XML
Data using the XSLT and sending the same to browser. 
I want to add the anchor to the text. when i add <a>
tag it doesn't show anything on browser. if i remove
the anchor tag it shows the rectangle but without
href.

if i use the saxon for generating the .svg file then
it shows correctly. I don't understand where i am
going wrong.
Below is AA.xml file

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="button.xsl"?>
 <button>  
 <text>Google</text>  
 <url>http://www.google.com</url>
 </button>


below is the AA.xsl file

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xlink="http://www.w3.org/2000/xlink/namespace/";
 xmlns:svg="http://www.w3.org/2000/svg";>
<xsl:output method="xml" omit-xml-declaration="no"
indent="yes" version="1.0"
doctype-system="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";
doctype-public="-//W3C//DTD SVG 1.1//EN"/>
<xsl:template match="/">

<html>

<head>
<object id="AdobeSVG"
  
classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2">
</object>
<xsl:processing-instruction name="import">
        <xsl:text>namespace="svg"
implementation="#AdobeSVG"</xsl:text>
</xsl:processing-instruction>

</head>

<body>

<svg:svg width="100%" height="100%" viewBox="0 0 1024
768" zoomAndPan="enable"
xmlns:svg="http://www.w3.org/2000/svg";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xlink="http://www.w3.org/1999/xlink";>

<a> 
 <xsl:attribute name="xlink:href">          
  <xsl:value-of select="/button/url" />        
  </xsl:attribute>        
 
 
 <svg:rect x="3"  y="6" width="193" height="37"
style="fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:1"/>
       
 <svg:text x="26px" y="17px"  transform="translate(13
12)"
style="fill:rgb(0,0,0);font-size:24;font-family:Arial">
         
 <xsl:value-of select="/button/text" />        
 </svg:text> 
 </a>
 </svg:svg>
 <table>
 <tr>
 <td> Hi </td>
 <td> Atul </td>
 </tr>
 </table>
 </body>
 </html>
 </xsl:template>
 </xsl:stylesheet>


thanx and regards,

Atul


                
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to