This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Recursiveness
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: Recursiveness
- From: Ivar Snaaijer <i dot snaaijer at huisstijl dot nl>
- Date: Wed, 7 Jun 2000 10:36:48 +0200
- Reply-To: xsl-list at mulberrytech dot com
How can i only get the text from the current node without the children ?
I have to process this XML
<vergunning>
<overwegingen>
<kop>A Header text</kop>
<vereiste>
<kop>An other header text</kop>
normal text
<kop>thirdheader text</kop>
second normal text
</vereiste>
</overwegingen>
</vergunning>
to this text :
<VW_KopjeEnLijn>A Header text</VW_KopjeEnLijn>
<VW_Tussenkopje2>An other header text</VW_Tussenkopje2>
<VW_TekstInspring3>normal text</VW_TekstInspring3>
<VW_Tussenkopje2>thirdheader text</VW_Tussenkopje2>
<VW_TekstInspring3>second normal text</VW_TekstInspring3>
but i get with this XSL (The role statement is used for something completely
different, they represent styles in word 97)
<xsl:template match="overwegingen/kop">
<br/>
<fo:wrapper role="VW_KopjeEnLijn">
<xsl:apply-templates/>
</fo:wrapper>
</xsl:template>
<xsl:template match="overwegingen/vereiste">
<fo:wrapper role="VW_TekstInspring3">
<xsl:apply-templates/>
</fo:wrapper>
</xsl:template>
<xsl:template match="overwegingen/vereiste/kop">
<fo:wrapper role="VW_Tussenkopje2">
<xsl:value-of expr="."/>
</fo:wrapper>
</xsl:template>
the effect is someting like this :
<VW_KopjeEnLijn>A Header text</VW_KopjeEnLijn>
<VW_TekstInspring3>An other header text
normal text
thirdheader text
second normal text</VW_TekstInspring3>
probably because the "overwegingen/vereiste" is also in
"overwegingen/vereiste/kop"
Met vriendelijke groet,
Ivar Snaaijer
_______________________________
Iris Huisstijlautomatisering BV
P.O.Box 355
2950AJ Alblasserdam
The Netherlands
Tel: +31 78 699 29 00
Fax: +31 78 699 09 81
http://www.huisstijl.nl
mailto:I.Snaaijer@huisstijl.nl
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list