Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Sorting and eliminating duplicates >Thread Next - Re: Sorting and eliminating duplicates Re: Sorting and eliminating duplicatesTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
