Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Changing namespaces?
Changing namespaces? [message #598143] Thu, 01 June 2006 19:42
Alexander Stockinger is currently offline Alexander StockingerFriend
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
Previous Topic:Analysis of XML Schema specific annotations, properties in Resource Impl.
Next Topic:Changing namespaces?
Goto Forum:
  


Current Time: Fri Dec 19 04:13:20 GMT 2014

Powered by FUDForum. Page generated in 0.07234 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software