[Home] [By Thread] [By Date] [Recent Entries]
On 6/13/06, Trevor Nicholls <trevor@xxxxxxxxxxxxxxxxxx> wrote:
Hi Andrew Yes, sorry, that should have been <xsl:template match="CELL"> <td><xsl:apply-templates/></td> </xsl:template> ...for the very reason that youv'e found - you want to apply-templates to all elements, and just do nothing <SB> elements that arent the first in a sequence of <SB> elements as they will be processed by a moded template. 2. ---- <xsl:template match="SB[preceding-sibling::*[1][self::SB]]" priority="2"/> ---- Correct. 3. When I experimented by interspersing random elements amongst the SB runs, I found that they were each appearing twice. I see now, I think, that Dr Kay's templates presumed that the "higher-order" template was only selecting the first <B> child, hence the need to include ---- <xsl:apply-templates select="following-sibling::*[not(self::b)][1]"/> ---- (or [not(self::SB)] in my case) after the closing <B> in the main template. As my "higher-order" template (I don't know what the canonical term is, sorry) is simply doing a general <apply-templates /> then non-SB children are pulled in anyway. So I dropped that line as well.
On the samples I have tried since making these changes, it seems now to be doing what I want. great. cheers andrew
|

Cart



