Hi!
 I am running a simple style sheet on SVG content to generate scalable SVGT
content by setting width and height 100%. The problem is when I apply the
style sheet on the INPUT SVG CONTENT, it generate the outout and set the
width and height as 100%. However it also copy many unwanted namespace
attributes in the OUTPUT SVG CONTENT. I am not so proficient in XSLT. Can
you please help me identifying the problem?

STYLE SHEET
=========================

?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"; xmlns:fo="
http://www.w3.org/1999/XSL/Format";
xmlns:svg="http://www.w3.org/2000/svg";>
<xsl:output indent="yes" method="xml"/>

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="/">
<xsl:apply-templates select="svg:svg"></xsl:apply-templates>
</xsl:template>


<xsl:template match="svg:svg">
<svg width="100%" height="100%" preserveAspectRatio="none">
<xsl:apply-templates></xsl:apply-templates>
</svg>
</xsl:template>

</xsl:stylesheet>

INPUT SVG CONTENT
===========================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>

<svg width="400" height="400" viewBox="0 0 400 400">
<line x1="20" y1="60" x2="360" y2="260" stroke="blue" stroke-width="10"/>
</svg>

OUTPUT SVG CONTENT
===========================
<?xml version = '1.0' encoding = 'UTF-8'?>
<svg width="100%" height="100%" preserveAspectRatio="none" xmlns:svg="
http://www.w3.org/2000/svg"; xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<line xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="
http://www.w3.org/1999/xlink"; x1="20" y1="60" x2="360" y2="260"
stroke="blue" stroke-width="10"/>
</svg>


[Non-text portions of this message have been removed]



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