Bug 11597 - Namespace URI of element reported incorrectly
Summary: Namespace URI of element reported incorrectly
Status: NEW
Alias: None
Product: Crimson
Classification: Unclassified
Component: other (show other bugs)
Version: 1.1
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Edwin Goei
Depends on:
Reported: 2002-08-09 19:24 UTC by Michael Kay
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2002-08-09 19:24:29 UTC
With the following source document:

<test2 xmlns="xyz:" xmlns:ZZZ="def:">
      <name ZZZ:dasAttribut="AttributWert" xmlns="abc:" 
            xmlns:ZZZ="def:">more text
  even more text

Crimson reports the following startElement events to the ContentHandler: the 
parameters are (uri, localname, qname)

ContentEmitter#startElement xyz:,test2,test2 at line 1
ContentEmitter#startElement xyz:,name,name at line 2
ContentEmitter#startElement xyz:,name,name at line 4

The URI of the inner <name> element is being incorrectly reported.

This is the version included in JDK 1.4.

I suspect Crimson is using the original namespace adapter for SAX2 written by 
David Megginson, or something close to it, as this bug was present in this 
adapter. The bug used to be present in AElfred also (which used this adapter): 
cf. Saxon bug 6.2.2/011 (see http://saxon.sf.net/saxon6.5.2/changes.html): 

"There is an error in namespace handling in the AElfred parser. When a "real"  
attribute precedes a namespace declaration in an element start tag, and the 
Name of the element or of an attribute is the same as the QName of the parent 
element or one of its attributes, then the namespace URI assigned to the name 
may be based on the namespace declarations in force for the parent element 
rather than those for the child element."

Michael Kay