You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Marcus Crafter <cr...@dresdnerbank.de> on 2000/11/09 13:24:27 UTC

[Xalan-J2] position function ?

Hi All,

	One of our developers found some interesting behaviour when using the
	'position function' in Xalan-J2.

	From our understanding, the following xml and xsl fragment:

<?xml version="1.0" encoding="iso-8859-1"?>
<root>
  <ROW>1</ROW>
  <ROW>2</ROW>
  <ROW>3</ROW>
</root>

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="ROW">
  <xsl:value-of select="."/><xsl:text> - </xsl:text><xsl:value-of select="position()"/>
</xsl:template>
</xsl:stylesheet>

	should yield an output of:

1 - 1
2 - 2
3 - 3

	however we seem to be getting:

1 - 2
2 - 4
3 - 6

	Attached is a .tgz demonstrating the behaviour.

	Have we made an xsl error here ? or could this be a xalan problem ?

	We also noticed that Xalan-J2 changes the encoding from iso-8859-1 to
	UTF-8 in the output xml file - should this also be happening ?

	If there is anything we can do to help, please let us know.

	Cheers, hope everyone has a great day,

	Marcus
	
	(we tested with Xalan-J2 from todays CVS)

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750