Subject: Re: node()[last()] acts a little bit weird in MSXML3? From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 27 Jun 2000 17:25:23 +0100 (BST) |
> Excerpt from the xsl file: unfortunately the excerpt os too small to tell what you were trying to do (but the code probably does something different:-) I'll assume that in your template for p you have an <xsl:apply-templates/> so that at that point a node list of all the child nodes of p will be created. ... then you have <xsl:template match="p/node()[last()]"> so this template will only match the last of those nodes. All the other nodes in the list will have other templates applied, but you haven't shown the rest if your sheet. They will have the default template, if you haven't specified any other matching template/ So the earlier nodes will do whatever they do, then on the last node, this template will be matched. If the xsl:apply-templates is as I guessed above, with no select attribute then the last node in the node list will not have any following siblings so current()/following-sibling::* will always be the empty node set (and thus have string value an empty string) and br will have the string value of any br children of the current node. this is most likely also empty string so this <xsl:if test="not(current()/following-sibling::*=br)"> is testing if it is not the case that two empty strings are equal. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
node()[last()] acts a little bit we, Patrik Höiem-Flyckt | Thread | Shipping invoice and label generati, Xu, Xiaocun |
RE: How to extract comments only?, John Greek | Date | Shipping invoice and label generati, Xu, Xiaocun |
Month |