commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Davey <Michael.Da...@CodeRage.ORG>
Subject Re: [betwixt] XML files and XMLIntrospector
Date Sun, 27 Oct 2002 22:26:39 GMT
Michael Davey wrote:
> Hi,
> I am having a problem with betwixt and I am not sure whether it is a bug 
> or lack of unserstanding. 

> The problem is that XMLIntrospector (actually 
> ElementDescriptor.hasAttributes()) does not see the 'id' attribute for 
> my inner class when looking for the ID/IDREF attribute 
> (getIDAttribute()) while preparing to write the class.

After further investigation...

The problem occurs when ElementDescriptor.hasAttributes() is called 
before ElementDescriptor.getAttributeDescriptors().

Possible fixes:
   Change javadoc for hasAttributes() to state that 
"getAttributeDescriptors() MUST be called before hasAttributes()" and 
then change XMLIntrospector.findIDAttribute() to comply with the new 

   Change hasAttributes() to call getAttributeDescriptors() if 
attributes == null.  Possible side effects?  I'm not familiar with the 
code, so I couldn't say.


View raw message