You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Usorov, Evgeny" <EU...@kbv.de> on 2004/07/30 13:59:58 UTC
derivation by restriction and to - definition
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
scope of import
Posted by Jeehong Min <je...@parasoft.com>.
All,
Just wanted to verify correct behavior in Xerces.
Suppose I have 3 schemas, with namespaces A, B, and C.
Schema A imports only schema B. Schema B imports schema C.
Is it legal for schema A to use a type from schema C?
Xerces says no, saying that types from schema C are not referenceable from
schema A. I agree with Xerces. However, I have a customer who is using
XMLSpy which does not complain about this.
So, what is the correct interpretation?
Thanks,
Jeehong
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org