[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: node()[last()] acts a little bit weird in MSXML3?

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)
noder last chrismas
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.