Subject: RE: Fwd: [xsl] complex XPATH test From: Adam Van Den Hoven <Adam.Hoven@xxxxxxxxxxxx> Date: Wed, 18 Jul 2001 09:15:20 -0700 |
I came up with the following scheme that doesn't seem to have any dependancies on for-each: <xsl:variable name="ancestorblock" select="(ancestor::p|... all the rest of them)[last()]" /> <xsl:if test="boolean(generate-id($ancestorblock/descendant::node()[last()]) != generate-id(current()))"> <br/> </xsl:if> That seems to work OK for me. Now I'll grant that I've tweaked it a bit, I had forgotten you could apply a predicate to (p | h2), but that seems to be the best possible solution since you aren't doing any loopeing or counting. Its also short. Thanks for your help. Adam XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Fwd: [xsl] complex XPATH test, Wendell Piez | Thread | [xsl] XML Special Characters, Williams, Brad |
[xsl] Test for presence of attribut, Nathan Shaw | Date | [xsl] Last Position Check, Nathan Shaw |
Month |