Hello,
I've faced the following problem: The 'XSModel.getComponentsByNamespace()' method simply doesn't work for me. I've tried pretty simple example:
-----"simple.xsd" <?xml version="1.0" encoding="US-ASCII" ?>
<xs:schema xmlns="http://www.geocities.com/stanio/otherthing" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.geocities.com/stanio/otherthing">
<xs:element name="info"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string" /> <xs:element name="description" minOccurs="0" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element>
</xs:schema> -----"simple.xsd"--
I've set the default namespace for the schema document to match the 'targetNamespace' although I'm not sure I need it (I've tried it both ways - with and without it).
A call to 'XSModel.getComponents(XSConstants.ELEMENT_DECLARATION)' returns an 'XSNamedMap' which contains the "info" element declaration. However if I call:
XSModel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, "http://www.geocities.com/stanio/otherthing");
I get a 'null' result although the API doc specifies it should return an empty map even if it didn't find matching element. But the real problem is that it doesn't find the matching element - "info". Is this a know issue?
FWIW, If I don't use 'targetNamespace' and try:
XSModel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, null);
I get a "positive" result.
-- Stanimir
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]