This is a speculation only, not an authoritative reply.

I would guess that <any ...maxOccurs="unbounded"/>
means "a single arbitrary element, repeated an arbitrary number of times"
rather than "an arbitrary sequence of possibly disparate elements".

Then
    <element name="bar" maxOccurs=2/>
would be a specialized form of
     <any ... maxOccurs="unbounded" minOccurs="0"/>
but a sequence of two disparate elements would not.

Jeff
----- Original Message ----- 
From: "Usorov, Evgeny" <[EMAIL PROTECTED]>
To: <xerces-j-dev@xml.apache.org>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 3:42 AM
Subject: derivation by restriction and <any>-Element


Hi,

why this example is wrong, and i get Xerces 2.6.2 error-messages ?

<xs:complexType name="basis_test_typ">
<xs:sequence>
<xs:element name="foo"/>
<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="derived_test_typ">
<xs:complexContent>
<xs:restriction base="basis_test_typ">
<xs:sequence>
<xs:element name="foo"/>
<xs:element name="bar"/>
<xs:element name="bar2"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

[Error] test.xsd:148:42: rcase-Recurse.2: There is not a complete functional
mapping between the particles.
[Error] test.xsd:148:42: derivation-ok-restriction.5.4.2: Error for type
'derived_test_typ'.  The particle of the type is not a valid restriction of
the particle of the base.


Thanks in advance
Evgeny


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



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

Reply via email to