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: output content after <br>


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


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