Jump to content

hb_teddy

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by hb_teddy

  1. "all" has only one type of child element, that is "element". So if you put "choice" in "all", there will be an error.
  2. hb_teddy

    XSD

    xml schema has no ability, such condition to test.
  3. <xsd:complexType><xsd:sequence> <xsd:element name="info" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:choice> <xsd:element name="error" type="xsd:string" /> <xsd:element name="fileNumber" type="xsd:string" /> </xsd:choice></xsd:sequence></xsd:complexType>hope it is not ugly
  4. define a simpletype at first and use this simpletype to extend the complextype you need<xs:schema ><xs:element name="ELEMENTS"> <xs:complexType> <xs:sequence> <xs:element ref="EL_ONE" /> </xs:sequence> </xs:complexType></xs:element> <xs:simpleType name="ZERO_ONE_Type"> <xs:restriction base="xs:integer"> <xs:minInclusive value="0"/> <xs:maxInclusive value="7"/> </xs:restriction></xs:simpleType><xs:element name="EL_ONE"> <xs:complexType> <xs:simpleContent> <xs:extension base="ZERO_ONE_Type"> <xs:attribute name="id" type="xs:string" /> </xs:extension > </xs:simpleContent> </xs:complexType></xs:element> </xs:schema>hope can help you
×
×
  • Create New...