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
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