[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Variable containing unique values
On Wed, May 21, 2008 at 10:28 PM, Hesselberth, Jan > <xsl:variable name="unique-dates"> > <xsl:for-each > select > > ="REPORT/Rollover/RolloverForecast/summaryAccount/element[generate-id()= > generate-id(key('e',rolloverDate)[1])]"> > <xsl:sort select="."/> > <xsl:value-of select="." /><xsl:if > test="position() != last()">,</xsl:if> > </xsl:for-each> > </xsl:variable> I suspect your key definition is wrong. As per your code, it should be: <xsl:key name="e" match="element" use="rolloverDate" /> In your code, you do: <xsl:value-of select="." /><xsl:if test="position() != last()">,</xsl:if> It seems, you should do: <xsl:value-of select="rolloverDate" /><xsl:if test="position() != last()">,</xsl:if> > <xsl:for-each > select="xalan:nodeset($unique-dates)"> Your code has: <fo:table-body> ... It seems you are displaying the unique dates in a table (or something like that). It looks to me, you shouldn't store the dates in a variable (with comma separation) and later iterate from the variable. You can directly generate table contents from the source position itself. -- Regards, Mukul Gandhi
|
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
|