You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/08/28 16:38:18 UTC

DO NOT REPLY [Bug 22769] - variable reference from imported stylesheet causes null pointer exception

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22769>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

variable reference from imported stylesheet causes null pointer exception





------- Additional Comments From jycli@ca.ibm.com  2003-08-28 14:38 -------
Hi, Chris

According to XSLT 1.0 Spec. section 2.6.2. Stylesheet import, 
your stylesheet will have this following import precedence:
1. stylesheet A imports stylesheets B and C in that order;
2. stylesheet B imports stylesheets C and D in that order;
Then the order of import precedence (lowest first) is C, D, B, C, A.

[In general, a definition or template rule with higher import precedence takes 
precedence over a definition or template rule with lower import precedence. ]

The variable foo definition in the second C takes precedence over the $foo 
defined in the first C. Therefore, when $foo is used in D, it hasn't been 
defined yet. so you got NPE when it tries to getValue out of $foo in concat
('x', $foo). 
I don't think it is a valid bug. Please double check your stylesheet.