Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Zukero

  • Rank
  1. I think it's impossible and even if it were, it would lead to numerous problems. You just can't define two elements with the same name at the same level. Think about what it would lead to if you then use <xs:element ref="taxe">. There would be no determinist way to know what element it refers to.I wonder if this is even valid XML.Maybe delaring a simpleType owning a union of the two requested type would do the trick, but there is no "empty" type AFAIK in xsd.
  2. What about using sequence, and creating two different sequences, one when elem0 is before elem1, and another for the other case. Then put those two sequences in a choice, itself in a complexType ?Not clear ? I'll try with an example : <xs:complexType name="type0"> <xs:choice> <xs:sequence> <xs:element name="elem0" type="xs:string" minOccurs="1" maxOccurs="1" /> <xs:element name="elem1" type="xs:string" minOccurs="1" maxOccurs="1" /> <xs:element name="elem2" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:s
  3. Maybe you can try to double your elements in the sequence, and let the min/maxOccurs values be anything. Something like : <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="toto"/> <xs:element ref="toto"/></xs:sequence> Hope it helps.
  4. Hi,What about declaring a dummy type for your VALUE element, that dummy type being a choice between three types, each one corresponding to one of your cases ? <complextype name="dummy"> <sequence> <choice> <element name="VALUE" type="string"/> <element name="VALUE" type="tns:typeCase2"/> <element name="VALUE" type="tns:typeCase3"/> </choice> </sequence></complextype> Other point, I think a ComplexType can represent an element that can look like a SimpleType, that is for example : <complextype name="toto">
  • Create New...