Element sequence in XML (using CWM and XMI)

N

Nick

Hello,

How can I describe in XML file, using specifications CWM and XMI,
column sequence in primary key, foreign key and unque constraint?

I see two variants:
1. Using the additional XML elements (or attributes) to describe a
position of a column in a key.

For example:
<CWM:UniqueKey.feature>
<CWM:StructuralFeature xmi.idref="_column1_id" position="1"/>
<CWM:StructuralFeature xmi.idref="_column2_id" position="2"/>
</CWM:UniqueKey.feature>
or
<CWM:UniqueKey.feature>
<ExtElement position="1">
<CWM:StructuralFeature xmi.idref="_column1_id"/>
</ExtElement>
<ExtElement position="2">
<CWM:StructuralFeature xmi.idref="_column2_id"/>
</ExtElement>
</CWM:UniqueKey.feature>

2. Using the order of elements in XML a file.

For example:
<CWM:UniqueKey.feature>
<CWM:StructuralFeature xmi.idref="_column1_id"/>
<CWM:StructuralFeature xmi.idref="_column2_id"/>
</CWM:UniqueKey.feature>

Is there guarantee, that all xml parsers will recognize XML file in
example 2 equally?
Does XML guarantee to keep order of XML elements of the same Element
Type?

Thanks,
Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top