This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSL : Selecting nodes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]