http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2280

*** shadow/2280 Fri Jun 22 03:29:18 2001
--- shadow/2280.tmp.18794       Fri Jun 22 03:29:18 2001
***************
*** 0 ****
--- 1,59 ----
+ +============================================================================+
+ | Position function gives wrong number back                                  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2280                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.4                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Linux                   |
+ |     Priority: Other                     Component: org.apache.xalan.transf |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ The position function will result in a wrong number. This happens when 
+ the java program is: java org.apache.xalan.xslt.Process -IN test2.xml -XSL
+ test2.xslt -OUT t.svg
+ 
+ test2.xml:
+ <namen>
+ <naam>Piet</naam>
+ <naam>Jan</naam>
+ <naam>Kees</naam>
+ </namen>
+ 
+ test2.xsl
+ <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+ <xsl:template match="/">
+ <html>
+ <xsl:apply-templates />
+ </html>
+ </xsl:template>
+ 
+ <xsl:template match="naam">
+ <xsl:value-of select="string(position())"/>, <xsl:value-of select="."/>
+ </xsl:template>
+ 
+ <xsl:template match="*">
+       <xsl:apply-templates />
+ </xsl:template>
+ 
+ </xsl:stylesheet>
+ 
+ 
+ The resulting output is:
+ <html>
+ 2 . Piet
+ 4 . Jan
+ 6 . Kees
+ </html>
+ 
+ Note that if I try this transformation with pre-compiled stylesheets which are
+ loaded in memory then the resulting output is correct (1,2 and 3). However
+ directly calling the xslt.Process results in this incorrect output (or am I
+ doing something wrong).
+ 
+ gr. Martin
\ No newline at end of file

Reply via email to