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

XT bug?

Subject: XT bug?
From: David Hunter <david.hunter@xxxxxxxxxxx>
Date: Tue, 30 May 2000 14:59:18 -0400
xt bug
I just finished leaving the list, because I get too much email, and now I
have a question, and have to re-join.  :-)

I have come across an inconsistency, between XT and Saxon/MSXML3 (the May
release of MSXML).  I'm assuming that XT is incorrect, but I want to be
sure.

Suppose I have the following XML:

<nodes>
  <node>a</node>
  <node>b</node>
  <node>c</node>
</nodes>

I want to create a stylesheet which prints out only the value of the last
<node> element.  So I have done this:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:template match="/nodes/node[last()]">
  <xsl:value-of select="."/>
</xsl:template>

<xsl:template match="text()"/>
</xsl:stylesheet>

>From both Saxon and MSXML, I get "c" as my output, but from XT I get
nothing.

Is this an XT bug?  Note that if I change the template match to
"/nodes/node[position() = last()]", it works the same in all three.

If this is a bug, I'll submit it on XT's web site, but if it's a
re-interpretation of the spec, I'll leave it.

David Hunter
MobileQ
david.hunter@xxxxxxxxxxx
http://www.mobileq.com 


 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.