DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24290>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24290 Choice containing sequence does no validate correctly Summary: Choice containing sequence does no validate correctly Product: Xerces2-J Version: 2.5.0 Platform: Other OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I have a "Version" type which is defined as containing at least one of "VersionNo" and "VersionDateTime". It must contain exactly one of those children, or both of them. As far as I can tell the only way to define this in Schema is as follows: <xs:complexType name="VersionType"> <xs:choice> <xs:element name="VersionNo" type="xs:integer"/> <xs:element name="VersionDateTime" type="xs:dateTime"/> <xs:sequence> <xs:element name="VersionNo" type="xs:integer"/> <xs:element name="VersionDateTime" type="xs:dateTime"/> </xs:sequence> </xs:choice> </xs:complexType> However when I create an instance document containing both nodes: <Version> <VersionNo>1</VersionNo> <VersionDateTime>2003-10-31T15:00:00</VersionDateTime> <Version> ... which, incidentally, validates correctly in XMLSpy, I get the following validation error from Xerces: cvc-complex-type.2.4.d: Invalid content was found starting with element 'VersionDateTime'. No child element is expected at this point. This applies to both 2.4.0 and 2.5.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
