Hi all, I've been trying to get an external XSL stylesheet to transform SVG, but I can't get it to work. I've been using the example from the 1.1 spec, so this is what I have:
mystyle.xsl <?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg"> <xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD SVG 1.1//EN" doctype-system="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"/> <!-- Add version to topmost 'svg' element --> <xsl:template match="/svg:svg"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="version">1.1</xsl:attribute> <xsl:apply-templates/> </xsl:copy> </xsl:template> <!-- Add styling to all 'rect' elements --> <xsl:template match="svg:rect"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="fill">red</xsl:attribute> <xsl:attribute name="stroke">blue</xsl:attribute> <xsl:attribute name="stroke-width">3</xsl:attribute> </xsl:copy> </xsl:template> </xsl:stylesheet> SVGsource.svg <?xml version="1.0" standalone="no"?> <svg width="10cm" height="5cm" xmlns="http://www.w3.org/2000/svg"> <rect x="2cm" y="1cm" width="6cm" height="3cm"/> </svg> The stylesheet works when I use an XSLT processor (jEdit plugin, which I think uses Xalan). However, according to the spec, I should be able to put in an <?xml-stylesheet ...?> declaration and have the xsl applied automatically, right? I've seen an example of this in an XSLT tutorial online that transforms XML into HTML, and it worked fine for me. When I put <?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?> under the <?xml ...?> declaration, nothing seems to happen. I still see a black rectangle when I open the file. Am I missing something? Is this a browser thing (IE 6, ASV 3)? Any help would be greatly appreciated. Peter ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/

