This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: output content after <br>
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 28 May 2002 15:12:18 +0200
- Subject: Re: [xsl] output content after <br>
- References: <01b501c20647$944f39e0$0a01a8c0@omnibility.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello,
I would change your code at another point:
> <xsl:template match="content">
> <xsl:apply-templates select="node()"/>
> </xsl:template>
>
> <xsl:template match="break">
> <br/>
> </xsl:template>
<xsl:value-of select="node()"/> - as you had it - selects the value of the
first node(), in your case only the first text node. If you change it to
<xsl:copy-of select="node()"/> or <xsl:copy-of select="text()"/> all nodes
or all text will be copied. After the text your <br/> will be appended. So
the above should work easier and better. There is a built-in template, which
outputs every text-node similar to:
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
Regards,
Joerg
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list