Subject: Re: [xsl] Blindstaring on descendent(-or-self), following(-sibling) and the like, from inside an xsl:function From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Tue, 26 Sep 2006 19:55:26 +0200 |
<xsl:when test="$current-node/node()[1][self::text()]"> <xsl:text>NO TAG, JUST TEXT, WRITE FONT_DECL</xsl:text> </xsl:when>
... but given your case, don't you want the font_decl *any* time you have a text node child (even in the middle or at the end)? So "$current-node/text()" would be the test?
If it passes the test, I think you probably want to shift into a special mode:
<xsl:template match="*" mode="font-wrapper"> <xsl:template match="text()" mode="font-wrapper">
In any case I suspect that even if this doesn't do the trick, a special mode offers you a much nicer and more general solution to your problem.
Similarly, I wonder if you really want or need a function to do this. In XSLT we can "micro-pipeline", using templates to process the results of using templates; the function looks to me like it's only adding extra overhead.
Please forgive me if I've understood the problem incorrectly.
Cheers, -- Abel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Blindstaring on descenden, Wendell Piez | Thread | [xsl] Easy Key-grammar Question, Bob Portnell |
Re: [xsl] Blindstaring on descenden, Wendell Piez | Date | [xsl] Easy Key-grammar Question, Bob Portnell |
Month |