Thread: Xml / Xsl
View Single Post
Old 11-28-2002, 06:00 PM   PM User | #1
jeorg
Regular Coder

 
Join Date: Jul 2002
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
jeorg is an unknown quantity at this point
Xml / Xsl

with this xml file

<conditions>
<titlePara>title 1</titlePara>
<para>para 10</para>
<titlePara>title 2</titlePara>
<para>para 20</para>
<para>para 21</para>
</conditions>

and this xsl file

<xsl:template match="/">
<xsl:for-each select="/conditions/titlePara">
<div class='title1'>
<xsl:value-of select="."/>
</div>
<xsl:for-each select="/conditions/para">
<div class='ParaNormal'>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

I get

title 1
para 10
para 20
para 21
title 2
para 10
para 20
para 21

how can I get

title 1
para 10
title 2
para 20
para 21

THANK YOU !
jeorg is offline   Reply With Quote