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

Re: Variable containing unique values

Subject: Re: Variable containing unique values
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 21 May 2008 22:57:56 +0530
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

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.