Inheritance in schema order insensitive

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amolkasbekar@gmail.com

    #1

    Inheritance in schema order insensitive

    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. PeronFullInfoTy pe 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

    #2
    Re: Inheritance in schema order insensitive

    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


    amolkasbekar@gm ail.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. PeronFullInfoTy pe 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>

    Comment

    Working...