Re: [xsl] Fwd: text nodes

Subject: Re: [xsl] Fwd: text nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 18 Sep 2008 12:42:24 +0100
> I am not sure how to deal with <br/> elements.


>   <xsl:for-each select="following-sibling::text()[ generate-id(
> following-sibling::a[1] ) = $next_a ]">
>       <xsl:value-of select="."/>
>   </xsl:for-each>

value-of gives the string value of its argument, which is "" for <br/>
also you are only selecting text but you want to select all nodes
you want copy-of here, so

   <xsl:for-each select="following-sibling::node()[ generate-id(
 following-sibling::a[1] ) = $next_a ]">
       <xsl:copy-of select="."/>
   </xsl:for-each>

or more simply

<xsl:copy-of select="following-sibling::node()[ generate-id(
 following-sibling::a[1] ) = $next_a ]"/>

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread