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

Subject: node()[last()] acts a little bit weird in MSXML3?
From: Patrik Höiem-Flyckt <patrik.hoiem@xxxxxx>
Date: Tue, 27 Jun 2000 18:12:08 +0200
I have some excerpts of code below everything...

I'm working with MSXML3 (latest MSXML version) and have noticed that node()
doesn't seem to work, at least as I expect. It could be a misunderstanding
from my side or a combination with last() which complicates everything...
What I'm trying to do is selecting the last node inside a <p> tag and put a
<br/> after it, if it doesn't already exist a <br/> there.

Shouldn't p/node() apply to all nodes (including text nodes) inside p and
then last() just return the last one of them? Or does last() only apply to
element nodes and attribute nodes? If you look in the code below: Here I get
a <br/> after the last attribute inside the <p align="center">-tag (not what
I want) and a <br/> after the last element in the first <p> section (just
what I want). In the last <p> section which only contains one text node I
don't get any <br/> (not what I want).

Is it me or is it MSXML3 that's wrong - and if I'm wrong is there any good
documentation to enlighten me?

Regards /Patrik

Excerpt from the xsl file:

<xsl:template match="p/node()[last()]">
 <xsl:if test="not(current()/following-sibling::*=br)">
  <xsl:apply-templates select="*"/>

Excerpt from the xml file:

 <card id="main" title="Flight info">
  <p align="center">
   Welcome to SWI
   <input name="Input" type="text" title="Seats">

   <select name="al" iname="ial">
     <text>SK404 to <var name="Kalle"/></text>
     <text>SK408 to Västerås</text>
     <text>SK412 to Copenhagen</text>

   <link name="laban" type="access">
    <text>Flights to <svar name="Kalle"/></text>


   <a href="laban.xml">Laban</a>

  <do type="accept" label="Go Home">

 <card id="help" title="Help info">
   Help text

Patrik Höiem-Flyckt
HiQ Väst AB
Mob: +46 (701) 839181
Tel: +46 (31) 7439181

 XSL-List info and archive:

Current Thread