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]
Other format: [Raw text]

Re: how get the correct value?


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>&#xA;</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


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