Web Analytics Made Easy -
StatCounter XML Schema that allows elements in arbitrary order unlimited number of times - CodingForum

Announcement

Collapse
No announcement yet.

XML Schema that allows elements in arbitrary order unlimited number of times

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML Schema that allows elements in arbitrary order unlimited number of times

    Hi I'm trying to write an xml-schema that supports the following scenario. I have an element "top" that must contain one "suba" and one "subb" element aswell as one *or more* "subc" elements. The elements can appear in any order. (Strictly speeking the "subc"s will always come last but let's not care about that).

    Example of a valid top element

    <top>
    <suba/>
    <subb/>
    <subc/>
    <subc/>
    </top>

    This is also valid

    <top>
    <subb/>
    <suba/>
    <subc/>
    </top>

    The problem is that the <all> tag only allows one entry for each element and the <sequence> tag forces the elements to come in order.

  • #2
    I am having a very similar problem and can't seem to find an answer. Any help would be greatly appreciated. Thanks.

    Comment


    • #3
      Not possible

      I think I've found the answer. It is simply not possible. The xml schema does not allow such constructs.

      Comment

      Working...
      X