Extended types in xsd

  • frank

    frank - 2011-12-15

    Hi all,

    In my xsd, there are certain types that extend a supertype and that can be used interchangeaby in lists. F.e. the type "rule" is a supertype. ValidationRule and PricingRUle extend this supertype and will be used in other structures of the document.

    When I create a configuration file from my xsd and open it to edit xml, I am able to add the supertype only. The extended types can not be added.

    Is this something that is possible to do with jaxe? And if so, what should I be doing to achieve this?

    Thank you very much in advance.

    Kind regards,

    fyi: the xsd looks somthing like this:

    <xs:complexType name="ruleGroup">
          <xs:element name="rules" type="rule" maxOccurs="unbounded"/>

    <xs:complexType name="rule">
          <xs:element name="ruleName" type="xs:string" minOccurs="0"/>

    <xs:complexType name="priceRule">
          <xs:extension base="rule">

  • Damien Guillaume

    Configuration file rules apply on XML elements, not types. You should be able to use an element based on an extended type. Here is an example in the W3C schema (XMLSchema.xsd): the "attribute" element is based on a type extending the "annotated" type, which contains the "annotation" element. Because of this, when you add an "attribute" element in an XML schema, you can add an "annotation" element inside.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks