Inheritance in schema order insensitive

Discussion in 'XML' started by amolkasbekar@gmail.com, Aug 23, 2006.

  1. Guest

    Is it possible to define inheritance between complex types in schema
    definitions so that the derived has the base elements and extended
    elements but is order insensitive. I have seen how to do it using
    Sequence but that imposes order. Is there a way to do it using Choice
    or All??

    Thanx in advance,
    Amol.

    e.g. PeronFullInfoType extends PersonType and I want to support xml
    structures as follows:

    <Person>
    <FirstName/>
    <LastName/>
    </Person>

    <PersonFullInfo>
    <FirstName/>
    <LastName/>
    <Phonenumber/>
    <Sex/>
    <Address/>
    <LastName/>
    </PersonFullInfo>

    <PersonFullInfo>
    <Sex/>
    <Address/>
    <FirstName/>
    <Phonenumber/>
    </PersonFullInfo>
     
    , Aug 23, 2006
    #1
    1. Advertising

  2. George Bina Guest

    When you extend a complex type you get sequence, see 3.2.3 from
    http://www.w3.org/TR/xmlschema-1/#key-efm

    Best Regards,
    George
    ---------------------------------------------------------------------
    George Cristian Bina
    <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
    http://www.oxygenxml.com

    wrote:
    > Is it possible to define inheritance between complex types in schema
    > definitions so that the derived has the base elements and extended
    > elements but is order insensitive. I have seen how to do it using
    > Sequence but that imposes order. Is there a way to do it using Choice
    > or All??
    >
    > Thanx in advance,
    > Amol.
    >
    > e.g. PeronFullInfoType extends PersonType and I want to support xml
    > structures as follows:
    >
    > <Person>
    > <FirstName/>
    > <LastName/>
    > </Person>
    >
    > <PersonFullInfo>
    > <FirstName/>
    > <LastName/>
    > <Phonenumber/>
    > <Sex/>
    > <Address/>
    > <LastName/>
    > </PersonFullInfo>
    >
    > <PersonFullInfo>
    > <Sex/>
    > <Address/>
    > <FirstName/>
    > <Phonenumber/>
    > </PersonFullInfo>
     
    George Bina, Aug 24, 2006
    #2
    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. Markus
    Replies:
    1
    Views:
    1,622
    Markus
    Nov 23, 2005
  2. FC
    Replies:
    4
    Views:
    5,936
    Keith Davies
    Oct 27, 2003
  3. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,301
    Stanimir Stamenkov
    Apr 25, 2005
  4. Replies:
    0
    Views:
    932
  5. Sven
    Replies:
    11
    Views:
    1,219
    Pavel Lepin
    Nov 5, 2007
Loading...

Share This Page