Atul,

What is your target browser-- I think maybe Firefox could get close to 
displaying this but it would need some help. (1) Your result is a mixed 
HTML and SVG document... which is okay... but I would avoid including a 
DOCTYPE in such a case. Also, the SVG is not rendering as SVG per se... 
it is simply letting the CSS apply to the text like a freely styled 
vocabulary. With that said, I bet you could do a very nice fallback for 
older browsers using this approach...

For those of you that didn't run the transform, this is the output:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
<html xmlns:xlink="http://www.w3.org/2000/xlink/namespace/"; 
xmlns:svg="http://www.w3.org/2000/svg";>
<head>
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2">
</object>
<?import namespace="svg"
implementation="#AdobeSVG"?>
</head>
<body>
<svg:svg width="100%" height="100%" viewBox="0 0 1024&#xA;768" 
zoomAndPan="enable">
<a xlink:href="http://www.google.com";>
<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&#xA;12)" 
style="fill:rgb(0,0,0);font-size:24;font-family:Arial">Google</svg:text>
</a>
</svg:svg>
<table>
<tr>
<td> Hi </td>
<td> Atul </td>
</tr>
</table>
</body>
</html>


Cheers,
Jeff Rafter

atul K wrote:

 > 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
 >
 >
 >
 >
 >
 >
 >


------------------------ 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