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

position() returns doubled result - what do i miss?

Subject: position() returns doubled result - what do i miss?
From: jian <jian@xxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Mar 2003 15:50:05 +0900
xslt position doubled
i have :

<?xml version="1.0" encoding="UTF-8" ?>
<root>
      <item>item1</item>
      <item>item2</item>
      <item>item3</item>
      <item>item4</item>
      <item>item5</item>
      <item>item6</item>
      <item>item7</item>
      <item>item8</item>
      <item>item9</item>
</root>



to which i apply:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="html" version="4.01" encoding="UTF-8"/>

 <xsl:template match="/">
   <xsl:apply-templates match="root/item"/>
 </xsl:template>

 <xsl:template match="item">
   <xsl:value-of select="position()"/>
   <xsl:value-of select="."/>
 </xsl:template>

</xsl:stylesheet>


and for some reason i get :

      2item1
      4item2
      6item3
      8item4
      10item5
      12item6
      14item7
      16item8
      18item9

what do i miss?

jian

 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.