This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]