Changing namespaces? [message #598143] |
Thu, 01 June 2006 19:42 |
Alexander Stockinger Messages: 8 Registered: July 2009 |
Junior Member |
|
|
Hi all,
I have the following problem:
I create a XSDComplexType and set name, namespace etc. Then I add it to
my schema. However, after adding it to the schema the namespace has changed.
Here a little code for demonstration:
XSDComplexTypeDefinition complexType =
factory.createXSDComplexTypeDefinition();
complexType.setName(name);
complexType.setTargetNamespace(namespace);
complexType.setBaseTypeDefinition(baseType);
complexType.setDerivationMethod(XSDDerivationMethod.EXTENSIO N_LITERAL);
System.out.println("A "+complexType);
schema.getContents().add(complexType);
System.out.println("B "+complexType);
The output is:
A org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@1d10a5c (element:
null) (name: com.lizard.phoebe.plugin.model.JdbcConnection,
targetNamespace: http://www.lizardcreations.com/phoebe/plugin)
(derivationMethod: extension, final: null, abstract: <unset>,
contentTypeCategory: empty, prohibitedSubstitutions: null, lexicalFinal:
null, block: null, mixed: <unset>)
B org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@1d10a5c (element:
null) (name: com.lizard.phoebe.plugin.model.JdbcConnection,
targetNamespace: http://www.lizardcreations.com/phoebe/test)
(derivationMethod: extension, final: [], abstract: <unset>,
contentTypeCategory: empty, prohibitedSubstitutions: [], lexicalFinal:
null, block: null, mixed: <unset>)
As you can see the namespace has changed after the call to
XSDSchema.getContents().add(). Any idea where this comes from?
Thanks for your help!
Alex
|
|
|
Powered by
FUDForum. Page generated in 0.05686 seconds