This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how get the correct value?
- From: Oleg Tkachenko <olegt at multiconn dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 08 Apr 2002 13:57:16 +0200
- Subject: Re: [xsl] how get the correct value?
- Organization: Multiconn International
- References: <000301c1d4c7$2e594fb0$6501a8c0@pcukmka> <002501c1dedd$a0d5f640$0a01a8c0@unicaonline.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Carlos wrote:
> if i have this xml:
> <PARRAFOS>
> <IMAGEN>3.gif
> <TEXTO>asdf asfd sfd afas fasfd</TEXTO>
> <TEXTO>asdf asfd sfd afas fasfd</TEXTO>
> <TEXTO>asdf asfd sfd afas fasfd</TEXTO>
> <TEXTO>asdf asfd sfd afas fasfd</TEXTO>
> </IMAGEN>
> <IMAGEN>5.gif
> <TEXTO>asdf asfd sfd afas fasfd</TEXTO>
> </IMAGEN>
> <IMAGEN>
> <TEXTO>44.gif</TEXTO>
> </IMAGEN>
> </PARRAFOS>
>
> how , with xslt, can i get:
> 3.gif <br/>
> 5.gif<br/>
> 44.gif
Can you explain us which text you want to be in the output? I can see
only one common criterion - ".gif" substring, so just for fun llok at this:
<xsl:template match="text()">
<xsl:if test="contains(.,'.gif')">
<xsl:value-of select="normalize-space()"/>
<xsl:if test="ancestor::IMAGEN/following-sibling::IMAGEN">
<br/>
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:if>
</xsl:template>
--
Oleg Tkachenko
Multiconn International, Israel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list