xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mk...@ca.ibm.com
Subject Re: xpath: user code broken between 2.3.1 and 2.4D1
Date Wed, 14 Aug 2002 14:12:10 GMT
When I run this code under Xalan 2.4D1, the output is "bar". Is this the
expected output?

Please note that I have to remove the reference to org.apache.log4j.Logger
and nz.co.ecnetwork.log.Log4jInitialiser in your Java source, because I
don't have these classes.

Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: mkwan@ca.ibm.com

                      Simon Kitching                                                     
                      <simon@ecnetwork.        To:       xalan-j-users@xml.apache.org 
                      co.nz>                   cc:                                    
                                               Subject:  xpath: user code broken between 2.3.1
and 2.4D1                            
                      08/14/2002 01:00                                                   

Hi All,

I have a custom extension element which internally evaluates a "select"
attribute by calling XPath methods. Code which worked on xalan 2.3.1
does not work correctly after upgrading to xalan 2.4D1.

Basically, what happens is that my custom element gets passed an xpath
expression in its select attribute, just like <xsl:value-of> would. The
custom element evaluates the expression like <xsl:value-of> would, then
applies a whole bunch of extra validation rules according to other
attributes passed to the custom element (like min/max length,
wellformed-date-validation if it is a date, etc).

In Xalan2.3.1 it works fine. However in Xalan2.4D1, evaluation of any
xpath expression containing variable references fails because it cannot
find the variables.

The most likely place (from what I can see) for the cause of this change
is org/apache/xpath/XPath.java; 2.3.1 is based on version 1.22, while
2.4D1 is based on 1.24. A number of serious-looking changes appear to
have occurred to this file...

Any suggestions/help would be *greatly* appreciated; I tried upgrading
to see if it would resolve another problem I was having. And start of
UAT phase was last friday :-(

Attached are:
  * test xml and xsl files demonstrating the problem
  * complete source code for the custom extension element (1 file)
    The relevant methods for this problem are text, text_ and doSelect.
  * a compiled version of the custom element. Just adding this to the
    classpath should allow it to be invoked from the stylesheet.

This problem has been experienced on:
 * Red Hat 7.3 with sun java 1.4.x (using java's endorsed override to
   force use of xerces/xalan/xml-apis jars).
 * AIX 5.x with IBM's JVM version 1.3.1

View raw message