That's odd, I remember fixing a bug similar to this one last year. It must have been in another class. I'll take a look at it.
Thanks. Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 08/05/2005 09:53:34 AM: > Using Xerces v2.7.1 I encounter a similar issue when using Xerces > v2.6.2 that namespace strings are compared as references rather than > using the equals() method therefore the comparison fails although > the strings are equal. The example: > > XSModel xsd; > String targetNamespace; > String componentName; > ... > XSNamedMap components = xsd > .getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, > targetNamespace); > > // select 'componentName' by traversing the 'components' > > XSObject selectedComponent = > components.itemByName(targetNamespace, componentName); > > The 'selectedComponent' gets null. The call to: > > xsd.getElementDeclaration(componentName, targetNamespace); > > however returns non-null result. I've debugged > XSNamedMapImpl.itemByName(String, String) and verified the the > 'namespace' argument and one of the 'fNamespaces' elements are equal > but for some reason the (namespace == fNamespaces[i]) gets false. > Probably the 'fNamespaces' values are not intern()-ed as the > 'namespace' argument gets. > > -- > Stanimir > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
