Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XSLT issue

1 view
Skip to first unread message

Siva

unread,
Feb 1, 2008, 10:34:01 PM2/1/08
to
Hi

Could someone explain me how this xslt works in biztalk? if i want to change
the node path to full path, how to do it?

<xsl:variable name="unique-countries"

select="//cities/city[not(@country=preceding-sibling::city/@country)]/@country" />

<countries>

<xsl:for-each select="$unique-countries">

<country name="{.}">

<xsl:for-each select="//city[@country=current()]">

<city><xsl:value-of select="@name" /></city>

</xsl:for-each>

</country>

</xsl:for-each>

</countries>

I am working on grouping nodes using XSLT in biztalk. I used the above XSLT
( i got it from online) and I got output without child nodes, Cuntry.

It looks like It didn't enter into for loop. I think I need to give node
full path.

Could someone tell me which places i need to change? I tried, no luck so far.

Thank you in advance,

Siva

--
Thank you,

Siva

Koen

unread,
Feb 7, 2008, 5:29:01 PM2/7/08
to
Hi,

the first for-each results in a list of coutries.
You must step one level up...

<xsl:for-each select="../city[@country=current()]">

==> you get all the countries matching the current country.

Siva

unread,
Feb 7, 2008, 5:33:02 PM2/7/08
to
Thank you for your help Koen. It works now.
--
Thank you,

Siva

0 new messages