~gagern/xalan/trunk

Viewing all changes in revision 4471.

  • Committer: zongaro
  • Date: 2008-06-19 02:40:41 UTC
  • Revision ID: svn-v4:13f79535-47bb-0310-9956-ffa450edef68:xalan/java/trunk:669374
Part of fix for Jira issue XALANJ-2446:

The implementation of Parser.getQName(String,String,String) method was ensuring
that any particular pair of namespace URI and local part of the name would
result in a unique QName object.  It did not take into account the prefix,
despite the fact that the original prefix might be associated with a different
namespace URI in this new context or no namespace at all.

Fixed this by making getQName take into account all three of the namespace URI,
local part of the name and prefix in order to create unique QName objects.

Some other parts of XSLTC depended on the assumption that a QName object
uniquely identified a pair consisting of the namespace URI and local part of
the name and used object reference comparisons (== or !=) on QName objects.
These comparisons all had to change to use equals(Object) for comparison
instead.  The implementation of QName.equals(Object) itself had to change to
consider the namespace URI and local part of the name rather than relying on
object identity.


Part of fix for Jira issue XALANJ-2447:

The handling of exclude-result-prefixes for an xsl:stylesheet had the complete
set of excluded prefixes accumulated on the xsl:stylesheet for the main
stylesheet module.  However, the scope of the attribute is supposed to consist
only of elements that are direct descendants of an element that has the
attribute, and does not extend to imported or included stylesheets.  The same
is true of namespaces excluded because they have been declared as extension
element prefixes.

Fixed this by maintaining a stack of excluded prefixes that's pushed on entry
to the Stylesheet.parseOwnChildren method and popped on exit from the same.
The push operation clears the current set of excluded prefixes and the pop
operation restores the set of excluded prefixes that were in effect for the
importing or including stylesheet.

Reviewed by Christine Li (jycli () ca ! ibm ! com)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: