[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: select unique name

Subject: Re: select unique name
From: "George Cristian Bina" <george@xxxxxxx>
Date: Sun, 18 Apr 2004 22:24:10 +0300
select unique
Hi,

> and I know how to display all 5 @names, but I don't
> know how to select unique names.
>
> \test00
> \test00
> \test10
> \test10
> \test20

You can look to the preceding siblings and make sure there is not already
one other file elements with the same value as the current one:

<xsl:for-each select="//file">
        <xsl:variable name="name"
select="substring-before(substring-after(@name,'build'),'src')"/>
        <xsl:if
test="not(preceding-sibling::file[substring-before(substring-after(@name,'bu
ild'),'src')=$name])">
          [<xsl:value-of select="$name"/>]
        </xsl:if>
</xsl:for-each>

   [\test00\test00]
   [\test10\test10]
   [\test20\test20]

Best Regards,
 George
-------------------------------------------------------
George Cristian Bina mailto:george@xxxxxxxxxxxxx
<oXygen/> XML Editor - http://www.oxygenxml.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.