This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL : Selecting nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] XSL : Selecting nodes
- From: Wendell Piez <wapiez at mulberrytech dot com>
- Date: Fri, 22 Jun 2001 16:49:36 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Ram:
At 08:27 PM 6/22/01, you wrote:
> Hi all
>
>I am trying to get the unique country and then based on the countryset I
>have to put it in a block for each country...
>to start with I tried doing ...
><xsl:variable name="countries" select="WarningLabel/Country[not(. =
>following::WarningLabel/Country)]"/>
> <xsl:for-each select="$countries">
> Country = <xsl:value-of select="$countries"/>
> </xsl:for-each>
>I am getting the same country value for each of the warning
>label...eventhough I have two different values...
This is because the value of a node set is the value of the first node in
the set. So <xsl:value-of select="$countries"/> will always be the same.
Try <xsl:value-of select="."/> (returns the value of the context node,
which is each of the $countries in turn)
Good luck,
Wendell (trying to raise his XSL-List quotient as high as Jeni's or Mike K's)
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list