| XML namespaces in generated models [message #606571] |
Wed, 02 April 2008 16:40 |
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.01500 seconds