[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: SVG Polyline Question?

Subject: RE: SVG Polyline Question?
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 4 Nov 2004 09:23:38 +0200
svg polyline
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.