Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » TextNode does not contain the TargetNamespace
TextNode does not contain the TargetNamespace [message #594537] Tue, 22 March 2005 15:46
Eclipse UserFriend
Originally posted by:


I have the following situation:

Using this Schema (the relevant part only):

<xs:schema xmlns:xs=""

<xs:complexType name="ct.alpha">
<xs:sequence minOccurs="1" maxOccurs="5">
<xs:element name="uno" type="" />
<xs:element name="duo" type="st.duo" />
<xs:element name="tres" type="ct.tres" />
<xs:attribute name="opt" type="xs:token" />

<xs:simpleType name="">
<xs:restriction base="xs:string">
<xs:enumeration value="hinz" />
<xs:enumeration value="kunz" />

.... and reading a jDOM-object that is created using this Schema.

When getting the first TextNode (a jDOM "Text" object representing
"") I try to get the targetNamespace of the object using:

if (jdomObj instanceof Text) {
namespace = ((Text)jdomObj)

The String "namespace" is empty ("").

Then I saw that this jDOM-object got its namespace from this code:

public ElementDeclaration(XSDElementDeclaration edecl, ...) {
String targetns = edecl.getTargetNamespace();
Text txt = new Text(temp);

checking the XSDElementDeclaration edecl I saw, that it did not hold a
targetNamespace (targetNamespace= null) but following the
"eContainer"-Attribute of "edecl" up to the complexType "ct.alpha"
taught me that the targetNamespace exists only in an upper level

edecl= XSDElementDeclarationImpl (id=33)
targetNamespace= null
eContainer= XSDParticleImpl (id=116)
eContainer= XSDModelGroupImpl (id=142)
eContainer= XSDParticleImpl (id=151)
eContainer= XSDComplexTypeDefinitionImpl (id=158)
name= "ct.alpha"
targetNamespace= "tests_localised_Schema"

My question:

Is this correct? Is the targetNamespace not inherited from complexTypes
to hierarchically lower TextNodes?
Previous Topic:POLL: Looking for head count & feedback from Max OS X users (Attn: Mac Users / Developers / Depl
Next Topic:TextNode does not contain the TargetNamespace
Goto Forum:

Current Time: Mon May 21 05:25:40 GMT 2018

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

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

Back to the top