Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsunexpected differences with/without target namespace
https://www.eclipse.org/forums/index.php/mv/msg/182105/577661/#msg_577661
Originally posted by: ihc.sas-glas.mottmac.com
I am surprised by some failures I am getting which only occur when a
targetNamespace is declared but disappear when I remove the
targetNamespace declaration.
Two examples:
1) a complex type has an attribute reference to a simple xsd:integer
attribute. XSD provides an AttributeUse with an AttributeDeclaration.
WITHOUT a target namespace declaration at the top level, the
AttributeDeclaration has as typeDefintion an XSDSimpleTypeDefinitionImpl
with name "integer", fine.
WITH a target namespace declaration at the top level, the same
typeDefiniion field is null.
See end for the schema for this example
2) an element with complex type defined within element as extending
another complex type.
WITHOUT a target namespace declaration at the top level, the
XSDElementDeclaration has as typeDefinition an
XSDComplexTypeDefinitionImpl.
WITH a target namespace the same typeDefinition field is null.
These nulls appear to doom a call to getEClassifier to throw a
NullPointerException as discussed in a previous post.