Hi all! I need your brilliant mind! I have next problem: I have an xsl document and I want to pass an array as a param (or variable) to this xsl to iterate over it.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="properties.xsl" />
<xsl:param name="upperLimit" />
<xsl:param name="value" />
<xsl:variable name="array" />
<xsl:template match="/">
<Chart zdepth="60" exeTime="2" chartOrder="area,column">
<categories>
<category label="Jan"/>
<category label="Feb"/>
<category label="Mar"/>
<category label="Apr"/>
<category label="May"/>
<category label="Jun"/>
<category label="Jul"/>
<category label="Aug"/>
<category label="Sep"/>
<category label="Oct"/>
<category label="Nov"/>
<category label="Dec"/>
</categories>
<dataset seriesName="budget" color="1E90FF" plotBorderColor="1E90FF" renderAs="column">
<set value="{$value}"/>
<set value="32800"/>
<set value="32600"/>
<set value="29600"/>
<set value="32600"/>
<set value="32600"/>
<set value="31800"/>
<set value="36700"/>
<set value="29700"/>
<set value="31900"/>
<set value="32900"/>
<set value="34800"/>
</dataset>
<dataset seriesName="sales" color="EE2C2C" plotBorderColor="EE2C2C" renderAs="area">
<xsl:for-each select="$array">
<xsl:copy-of select="."/>
</xsl:for-each>
</dataset>
<styles>
<definition>
<style name="captionFont" type="font" size="15"/>
</definition>
<application>
<apply toObject="caption" styles="captionfont"/>
</application>
</styles>
<xsl:call-template name="properties"/>
</Chart>
</xsl:template>
I have element, in which I have elements and I want each have some value from "array". (something like that: , or even in some loop: ).
How can I do this? Any suggestion will be very-very helpful and as soon as possible!
Thanks.