xsl-list
[Top] [All Lists]

Re: select unique name

2004-04-18 13:36:22
yes, now it works fine

Thanks for your help.
George

--- George Cristian Bina <george(_at_)sync(_dot_)ro> wrote:
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(_at_)oxygenxml(_dot_)com
<oXygen/> XML Editor - http://www.oxygenxml.com/





--+------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash


<Prev in Thread] Current Thread [Next in Thread>