[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Fwd: complex XPATH test
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|