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]