This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: search condition
- From: shenjun <shjunsuper at 263 dot net>
- To: "xsl-list at lists dot mulberrytech dot com" <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 6 Mar 2002 18:32:58 +0800
- Subject: Re: [xsl] search condition
- Organization: Eigenet
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi, Laura Jenkins
¡¡¡¡Your xsl is right! You can try it in your environment.
>Dear people,
>forgive me if my question is very basic.
>
>i want to search the element textid which has a text = 'ABC'
>
>can i acheive this by the for-each condition
>
><xsl:for-each select="//root/children/textid[.='ABC']">
>
>xml structure being
>
><root>
><children>
> <textid>ABC</textid>
></children>
><children>
> <textid>DEF</textid>
></children>
><children>
> <textid>ABC</textid>
></children>
><children>
> <textid>FGH</textid>
></children>
><children>
> <textid>ABC</textid>
></children>
></root>
>
>please correct me if i am wrong
>i am writing the xsl like below
>
><xsl:for-each select="//root/children/textid[.='ABC']">
><!-- to print the text -->
><xsl:value-of select="."/>
></xsl:for-each>
>
>many thanks in advance
>laura
>
>_________________________________________________________________
>Join the world’s largest e-mail service with MSN Hotmail.
>http://www.hotmail.com
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
= = = = = = = = = = = = = = = = = = = =
shjunsuper@263.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list