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 bu...@apache.org on 2001/07/06 01:30:22 UTC
[Bug 2467] New: - cannot handle lists of unions
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2467
*** shadow/2467 Thu Jul 5 16:30:22 2001
--- shadow/2467.tmp.8723 Thu Jul 5 16:30:22 2001
***************
*** 0 ****
--- 1,53 ----
+ +============================================================================+
+ | cannot handle lists of unions |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2467 Product: Xerces-J |
+ | Status: NEW Version: 1.4.1 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Windows NT/2K |
+ | Priority: Other Component: Schema-Datatypes |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: priscilla@walmsley.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ I tried to validate the following instance:
+
+ <root>10 none</root>
+
+ Against the following schema:
+
+ <xsd:simpleType name="ScoreAndNoScoreList">
+ <xsd:list itemType="ScoreAndNoScore"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="ScoreAndNoScore">
+ <xsd:union memberTypes="Score NoScore"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Score">
+ <xsd:restriction base='xsd:integer'>
+ <xsd:maxInclusive value='50'/>
+ <xsd:minInclusive value='5'/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NoScore">
+ <xsd:restriction base='xsd:NMTOKEN'>
+ <xsd:enumeration value='none'/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="root" type="ScoreAndNoScoreList"/>
+
+ It should be valid. The message I get is:
+
+ [Error] test.xml:2:45: Unknown base type for type ScoreAndNoScoreList.
+ [Error] test.xml:2:45: Schema error: cos-list-of-atomic: The itemType must have
+ a {variety} of atomic or union (in which case all the {member type definitions}
+ must be atomic).
+
+ When you can see that the base type of ScoreAndNoScoreList _is_ defined.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org