Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sorting and eliminating duplicates

From: "Mark" <mfreeman@--------.--->
To: NULL
Date: 4/6/2006 10:48:00 AM

This is awesome!  Thank you.  Works great except for one thing on my
side.

I'm sending a parameter to the XSL sheet to tell it which countries and
which Indicators to show.  My XML has 200 countries, and each country
has 100 or so Indicators.  So, from a drop-down list, I allow the user
to choose which Countries and which Indicators.

That being said, I modified the code you sent.
>From this:

<xsl:for-each select="Data/Country/Indicator[@FootnoteKEY !=
''][generate-id() = generate-id(key('unique-note', @FootnoteKEY)[1])]">


to this:

<xsl:for-each select="Data/Country/Indicator[@FootnoteKEY != ''][@KEY =
$lstIndicator][generate-id() = generate-id(key('unique-note',
@FootnoteKEY)[1])]">

I added [@KEY = $lstIndicator] to select only those indicators passed
to the sheet.  Now I need to select only those countries as well.  I
tried:

<xsl:for-each select="Data/Country[Indicator/@FootnoteKEY != ''][@KEY =
$lstCountry][Indicator/@KEY = $lstIndicator][generate-id() =
generate-id(key('unique-note', Indicator/@FootnoteKEY)[1])]">

with no success.  I need to somehow filter the countries.  That is why,
in my first post, I had two for-each loops.  There is probably an
easier way.  Or at least one that actually works!

Thanks again.

- Mark



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent