Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312337 - Invalid namespace of child elements after XML Serialization
Summary: Invalid namespace of child elements after XML Serialization
Status: RESOLVED INVALID
Alias: None
Product: EMF
Classification: Modeling
Component: XML/XMI (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 17:00 EDT by Renat Zubairov CLA
Modified: 2010-05-11 11:06 EDT (History)
0 users

See Also:


Attachments
A project with Extended library tutorial (From galileo) and unit test (118.96 KB, application/zip)
2010-05-10 17:01 EDT, Renat Zubairov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!