0
毎日の合計金額を表示したいと思います。私は以下のコードで試しました。 functx:翌日関数は、日付を設定するために使用されます。
入力
開始日= "2017年4月12日"xslt日付関連機能
NoDays = 6
価格= 15540
しかし、私は以下のような結果を示したいと思います。日付フィールドの値を設定する他の関数がありますか?
Current output:
<Night>
<Price Amount="2590" NightDate="2017-12-05" />
<Price Amount="2590" NightDate="2017-12-06" />
<Price Amount="2590" NightDate="2017-12-07" />
<Price Amount="2590" NightDate="2017-12-08" />
<Price Amount="2590" NightDate="2017-12-09" />
<Price Amount="2590" NightDate="2017-12-10" />
</Night>
Expected Output:
<Night>
<Price Amount="2590" NightDate="2017-12-04" />
<Price Amount="2590" NightDate="2017-12-05" />
<Price Amount="2590" NightDate="2017-12-06" />
<Price Amount="2590" NightDate="2017-12-07" />
<Price Amount="2590" NightDate="2017-12-08" />
<Price Amount="2590" NightDate="2017-12-09" />
</Night>
Currently used Logic:
<Night>
<xsl:for-each select="1 to $NoDays">
<Price>
<xsl:attribute name="Amount">
<xsl:value-of select="$Price div $NoDays"/>
</xsl:attribute>
<xsl:attribute name="NightDate">
<xsl:value-of select="functx:next-
day(xs:date($StartDate),position())"/>
</xsl:attribute>
</Price>
</xsl:for-each>
質問を正しくフォーマットしてください。 – Tomalak