B
BillD
I'm trying to derive a schema from a base schema. I want to redefine
a "group" from the base schema in my derived schema in order to add
more options to the "choice" aggregate (see schema1.xsd sample).
schema1.xsd sample:
<!-- Here is a clipped down version of the group I want to redefine.
-->
<xsd:group name="INSURANCESVCRQMSGS">
<xsd:choice>
<xsd:element ref="HomePolicyAddRq" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="HomePolicyQuoteInqRq" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
</xsd:group>
I'd like to redefine this "group" in the derived schema so that the
end product looks something like this:
schema2.xsd sample:
<xsd:group name="INSURANCESVCRQMSGS">
<xsd:choice>
<xsd:element ref="HomePolicyAddRq" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="HomePolicyQuoteInqRq" minOccurs="1"
maxOccurs="1"/>
<xsd:element ref="MyAdditionalElement" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
</xsd:group>
I see many examples of using the "redefine" tag to redefine a
"complexType", but I can't find anything on redefining a "group". The
standard example for a complexType is something like the following,
which adds a new "generation" element to a "personName":
<xs:redefine schemaLocation="v1.xsd">
<xs:complexType name="personName">
<xs:complexContent>
<xs:extension base="personName">
<xs:sequence>
<xs:element name="generation" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:redefine>
Can anyone enlighten me as to what a group redefinition should look
like?
Thanks,
Bill
a "group" from the base schema in my derived schema in order to add
more options to the "choice" aggregate (see schema1.xsd sample).
schema1.xsd sample:
<!-- Here is a clipped down version of the group I want to redefine.
-->
<xsd:group name="INSURANCESVCRQMSGS">
<xsd:choice>
<xsd:element ref="HomePolicyAddRq" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="HomePolicyQuoteInqRq" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
</xsd:group>
I'd like to redefine this "group" in the derived schema so that the
end product looks something like this:
schema2.xsd sample:
<xsd:group name="INSURANCESVCRQMSGS">
<xsd:choice>
<xsd:element ref="HomePolicyAddRq" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="HomePolicyQuoteInqRq" minOccurs="1"
maxOccurs="1"/>
<xsd:element ref="MyAdditionalElement" minOccurs="1"
maxOccurs="1"/>
</xsd:choice>
</xsd:group>
I see many examples of using the "redefine" tag to redefine a
"complexType", but I can't find anything on redefining a "group". The
standard example for a complexType is something like the following,
which adds a new "generation" element to a "personName":
<xs:redefine schemaLocation="v1.xsd">
<xs:complexType name="personName">
<xs:complexContent>
<xs:extension base="personName">
<xs:sequence>
<xs:element name="generation" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:redefine>
Can anyone enlighten me as to what a group redefinition should look
like?
Thanks,
Bill