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

XSLT 1.0 and XSLT 2.0 differences in position()?

Subject: XSLT 1.0 and XSLT 2.0 differences in position()?
From: Alice Wei <ajwei@xxxxxxxxxxx>
Date: Wed, 12 Dec 2007 20:00:56 -0500
 XSLT 1.0 and XSLT 2.0 differences in position()?
Hi,

I have made several attempts to turn my file from XSLT 1.0 to 2.0, but I have a strange question about the output. Are there supposed to be any differences in this function from 1.0 to 2.0?

In 1.0, my XSL segment:

<xsl:if test="position( ) !=last( )">, </xsl:if>
<xsl:if test="position( )=last()-1">and </xsl:if>

returns with a list of items separated by commas, and ends with and instead of a comma in between.

However, when I use the same XSL structure, but with the declaration of 2.0,
it returns with a list of items still separated by commas, but the last item on the list has a comma followed by an and.


eg. 1, 2, 3, 4 and 5 (XSLT 1.0)
   1, 2, 3, 4, and 5 (XSLT 2.0)

What must I do to get the XSLT 2.0 to have the same output as 1.0?
Thanks to those who can help.

Alice


Alice Wei MIS 2008 School of Library and Information Science Indiana University Bloomington

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.