Element sequence in XML (using CWM and XMI)

Discussion in 'Java' started by Nick, Oct 7, 2003.

  1. Nick

    Nick Guest

    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
     
    Nick, Oct 7, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pronto
    Replies:
    0
    Views:
    407
    Pronto
    Sep 15, 2003
  2. Mikael P
    Replies:
    1
    Views:
    544
    Soren Kuula
    Jan 27, 2004
  3. Soren Kuula

    XMl Schema for XMI

    Soren Kuula, Dec 15, 2005, in forum: XML
    Replies:
    0
    Views:
    467
    Soren Kuula
    Dec 15, 2005
  4. Afshar Mohebbi

    xmi and dotnet

    Afshar Mohebbi, Jul 7, 2007, in forum: XML
    Replies:
    0
    Views:
    388
    Afshar Mohebbi
    Jul 7, 2007
  5. Replies:
    3
    Views:
    1,566
    Joe Kesselman
    Feb 4, 2013
Loading...

Share This Page