Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312337

Summary: Invalid namespace of child elements after XML Serialization
Product: [Modeling] EMF Reporter: Renat Zubairov <rzubairov>
Component: XML/XMIAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
A project with Extended library tutorial (From galileo) and unit test none

Description Renat Zubairov CLA 2010-05-10 17:00:47 EDT
Build Identifier: 20100218-1602

A simple serialization example using extended library tutorial for EMF shows following serialized XML:
<extlib:Library xmlns:extlib="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0">
  <employees firstName="FirstName"/>
</extlib:Library>

The "employees" element has no namespace.

Reproducible: Always

Steps to Reproduce:
See attached project - run the JUnit test case org.eclipse.emf.test.ExampleTest
Comment 1 Renat Zubairov CLA 2010-05-10 17:01:54 EDT
Created attachment 167819 [details]
A project with Extended library tutorial (From galileo) and unit test

Added a project with Extended library tutorial (From galileo) and unit test
Comment 2 Ed Merks CLA 2010-05-11 08:26:58 EDT
I'm not sure why you're expecting the employees element to be qualified.  There's no extended meta data annotation that would direct it to be qualified so it's working as expected.
Comment 3 Renat Zubairov CLA 2010-05-11 08:32:37 EDT
I'm not expecting the employees element to be qualified, I'm just expecting it to be inside the same namespace as extlib element, right now it is in "null" namespace which seems to be strange.
We also seen the same behaviour for other cases where for example elements inside the feature map are generated with empty namespace.
Comment 4 Ed Merks CLA 2010-05-11 09:26:06 EDT
It's supposed to be null because it's supposed to be unqualified.  Similarly local element declarations in  a complex type will generally be unqualified and hence will also have null namespace.
Comment 5 Renat Zubairov CLA 2010-05-11 11:06:13 EDT
Oh, right. Sorry, got it now. Thnx!