K
Krzysztof Nogal
Hi,
I have following problem with XML Schema definition.
I have following element InitialEcrHeader:
<xs:complexType name="InitialEcrHeader">
<xs:complexContent>
<xs:extension base="ecm:EcmObject">
<xs:sequence>
<xs:element name="CoordinatorContact" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="EcManager" type="xs:token" minOccurs="0"></
xs:element>
<xs:element name="DistributionList" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="LeadingChangeScope" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="ParticipantContact" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
There is element EcrHeader which inherits from InitialEcrHeader:
<xs:complexType name="EcrHeader">
<xs:complexContent>
<xs:extension base="ecr:InitialEcrHeader">
<xs:sequence>
<xs:element name="EcManager" type="xs:token"></xs:element>
<xs:element name="LeadingChangeScope" type="xs:token"
minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Goal:
In EcrHeader element there should be exatcly only one occurence of
EcManager. In InitialEcrHeader it is defined as optional. I would like
to overwrite this definition with the new one - in EcrHeader. But
while instantiating this XML Schema it is allowed to create 2
EcManager elements inside EcrHeader - and it is not allowed for my
case.
Can someone give a tip how to achive that?
<p:Header key="a2" xsi:type="p:EcrHeader">
<pescription key="a3">
<p:Text>sd</p:Text>
</pescription>
<p:EcManager>aa</p:EcManager>
<p:EcManager>bb</p:EcManager>
<p:LeadingChangeScope>dd</p:LeadingChangeScope>
</p:Header>
TIA
Krzysztof Nogal
I have following problem with XML Schema definition.
I have following element InitialEcrHeader:
<xs:complexType name="InitialEcrHeader">
<xs:complexContent>
<xs:extension base="ecm:EcmObject">
<xs:sequence>
<xs:element name="CoordinatorContact" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="EcManager" type="xs:token" minOccurs="0"></
xs:element>
<xs:element name="DistributionList" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="LeadingChangeScope" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="ParticipantContact" type="xs:token"
minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
There is element EcrHeader which inherits from InitialEcrHeader:
<xs:complexType name="EcrHeader">
<xs:complexContent>
<xs:extension base="ecr:InitialEcrHeader">
<xs:sequence>
<xs:element name="EcManager" type="xs:token"></xs:element>
<xs:element name="LeadingChangeScope" type="xs:token"
minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Goal:
In EcrHeader element there should be exatcly only one occurence of
EcManager. In InitialEcrHeader it is defined as optional. I would like
to overwrite this definition with the new one - in EcrHeader. But
while instantiating this XML Schema it is allowed to create 2
EcManager elements inside EcrHeader - and it is not allowed for my
case.
Can someone give a tip how to achive that?
<p:Header key="a2" xsi:type="p:EcrHeader">
<pescription key="a3">
<p:Text>sd</p:Text>
</pescription>
<p:EcManager>aa</p:EcManager>
<p:EcManager>bb</p:EcManager>
<p:LeadingChangeScope>dd</p:LeadingChangeScope>
</p:Header>
TIA
Krzysztof Nogal