|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: SVG Polyline Question?
Hi,
> OK so this will seem really simplistic to most of you, but
> how do I create a
> polyline in svg to graph the <avg> elements?
>
> <?xml version="1.0" encoding="utf-8" ?>
> - <vName>
> 3 M COMPANY
> - <monthname>
> May
> <avg>93.9</avg>
> </monthname>
> - <monthname>
> June
> <avg>92.6</avg>
> </monthname>
> - <monthname>
> July
> <avg>95.7</avg>
> </monthname>
> - <monthname>
> August
> <avg>96.0</avg>
> </monthname>
> </vName>
E.g
<xsl:template match="vName">
<polyline>
<xsl:attribute name="points">
<xsl:for-each select="monthname">
<xsl:if test="not(position() = 1)"><xsl:text> </xsl:text></xsl:if>
<xsl:value-of select="concat(position() * 50, ',', avg)"/>
</xsl:for-each>
</xsl:attribute>
</polyline>
</xsl:template>
Cheers,
Jarno
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








