See my comments on your bugzilla report.  Are you saying this is a
regression in Xalan-J?  If you ever saw the behavior you're expection in
Xalan-J, then it was a bug.

If whitespace is really not significant, then remove it from your
documents, or use xsl:strip-space.

Dave



                                                                                       
                                                
                      "Scott Moore"                                                    
                                                
                      <puffandtoot@cox         To:      "Xalan J Dev" 
<[EMAIL PROTECTED]>                                       
                      .net>                    cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                           
                                               Subject: Bug in Xalan 2.4.0 with 
position()                                             
                      09/20/2002 01:27                                                 
                                                
                      PM                                                               
                                                
                      Please respond                                                   
                                                
                      to xalan-dev                                                     
                                                
                                                                                       
                                                
                                                                                       
                                                



I've found what I consider to be a major bug in Xalan.  The following
simple
files illustrate the problem:

XML:

<test>
 <pos>1</pos>
 <pos>2</pos>
</test>


XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
 <xsl:template match="/">
  <xsl:apply-templates/>
 </xsl:template>

 <xsl:template match="pos">
  <xsl:message>position() = <xsl:value-of select="position()"/>  Real
position is <xsl:value-of select="."/></xsl:message>
 </xsl:template>
</xsl:stylesheet>


Output:

<?xml version="1.0" encoding="UTF-8"?>

file:///C:/pos.xslt; Line #9;
Column #16; position() = 2  Real position is 1

file:///C:/pos.xslt; Line #9;
Column #16; position() = 4  Real position is 2



This is killing me.  I can't roll back to 2.3.1 because of bugs in that
version with <xsl:variable>.  What's the timeline for a new release of
2.4.x?

Thanks,
Scott






Reply via email to