Hi,

Our company defines some XML-Intefaces for exchange eHealth-data. So our 
global-schema-Standart 
for all interfaces can be only restricted by the specific XML-Schema-Interface. 
But i get all the time problems when somebody wants to restrict the 
global-schema. 

Situation:
Our standart provider_typ, only short-cut
        <xs:complexType name="provider_typ">
                <xs:sequence>
                        <!-- here some other elements like provider.type_cd, 
that are not relevant for this example-->
                        <xs:choice maxOccurs="unbounded">
                                <xs:element ref="person"/>
                                <xs:element ref="organization"/>
                        </xs:choice>
                </xs:sequence>
        </xs:complexType>

So with that type I can have 3 persons, who belongs to 1 organization. Now 
somebody 
wants to define specific schema for doctors, like one group practice can have 
many doctors. So here the specific_provider_typ

        <xs:complexType name="specific_provider_typ">
                <xs:complexContent>
                        <xs:restriction base="provider_typ">
                                <xs:sequence>
                                        <!-- here other specific elements, that 
are not relevant for this example-->
                                        <xs:element ref="person" minOccurs="0" 
maxOccurs="unbounded"/>
                                        <xs:element ref="organization"/>
                                </xs:sequence>
                        </xs:restriction>
                </xs:complexContent>
</xs:complexType>

So now in this specific_provider_typ I changed <choice> to <sequence>, now 
there have 
to be one organization and may be some persons. I think from the XML-view this 
is a 
valid restriction. 
But Xerces (2.6.2) reports an error:
[Error] test.xsd:129:47: rcase-Recurse.2: There is not a complete functional 
mapping between the particles.
[Error] test.xsd:129:47: derivation-ok-restriction.5.4.2: Error for type 
'specific_provider_typ'.  The particle of the type is not a valid restriction 
of the particle of the base.

Is it not allowed to change from <choice> to <sequence> or this is Xerces bug ? 
I tryed other ways to define global-schema, but without success. Only thing 
that works is to define in the global-schema normal <sequence> without <choice>.

Can somebody help ?
Thanks in advance
Evgeny Usorov
www.kbv.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • derivation by restriction and <choice> to <sequenc... Usorov, Evgeny

Reply via email to