-1
所有提交的數據這是我的XSLT:充分利用XML通過XSLT
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<graph>
<categories>
<category>
<xsl:attribute name="name">
<xsl:value-of select="Rows/row/@Date" />
</xsl:attribute>
</category>
</categories>
<dataset>
<xsl:attribute name="seriesName">
<xsl:value-of select="Rows/row/@Actual_Amount"/>
</xsl:attribute>
</dataset>
<dataset>
<xsl:attribute name="seriesName">
<xsl:value-of select="Rows/row/@Threshold"/>
</xsl:attribute>
</dataset>
<dataset>
<xsl:attribute name="seriesName">
<xsl:value-of select="Rows/row/@Forecast_Amount"/>
</xsl:attribute>
</dataset>
</graph>
</xsl:template>
這是我的結果:
<graph>
<categories>
<category name="2014-01-01"/>
</categories>
<dataset seriesName="1800.0000"/>
<dataset seriesName="500.0000"/>
<dataset seriesName="2800.0000"/>
</graph>
誰能告訴我爲什麼我只得到了我的許多XML的第一個數據請? 我也嘗試過<xsl:value-of select="."/>
......但只有我的第一個數據生成。請幫忙。
請顯示您的輸入XML。 – helderdarocha
和您的*預期*輸出。你期望幾個'graph'元素? – helderdarocha
你好!謝謝你回覆我... –