Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » XML namespaces in generated models
XML namespaces in generated models [message #606571] Wed, 02 April 2008 20:40
Eclipse User
Originally posted by: Robertson_Don.emc.com

I noticed that in generated XMI documents the root element is namespaced
with an explicit prefixed namespace declaration, but there is no default
namespace declaration and subordinate elements are not explicitly prefixed.

For example, "elements" below is not qualified (ecore and EMF from Ganymede
distribution) ...

<?xml version="1.0" encoding="UTF-8"?>
<rdb:Schema xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rdb="http://www.eclipse.org/qvt/1.0.0/Operational/examples/rdb">
<elements xsi:type="rdb:Table"/>
</rdb:Schema>

My understanding of XML is that the subordinate elements are not within a
namespace - containment only offers visibility to in-scope namespace
declarations, not implicit namespace assignment (except to an in-scope
default namespace).

Is this the intended behavior? If so, it complicates the use of XMI
documents in an XML repository (eg. with XQuery). And I can't see a point to
it.

Hopefully I am just plain wrong. If not, I know I can control serialization,
but as a default behavior this means the whole organization will have to do
so if we are to have EMF-generated documents co-resident in a repository.

Any comments?
Previous Topic:[Announce] SBVR component proposal
Next Topic:XML namespaces in generated models
Goto Forum:
  


Current Time: Thu Oct 23 16:04:51 GMT 2014

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

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