The last clause of the following constraint rules out having both minOccurs="0" and maxOccurs="0" specified: Schema Component Constraint: Particle Correct All of the following must be true: 1 The values of the properties of a particle must be as described in the property tableau in The Particle Schema Component (§3.9.1), modulo the impact of Missing Sub-components (§5.3). 2 If {max occurs} is not unbounded, that is, it has a numeric value, then all of the following must be true: 2.1 {min occurs} must not be greater than {max occurs}. 2.2 {max occurs} must be greater than or equal to 1. On the other hand, there are also multiple parenthetical comments, such as (unless minOccurs=maxOccurs=0, in which case the item corresponds to no component at all) But I think the constraint dominates. I don't know of a better solution to your second issue. xan -----Original Message----- From:Keith Suderman Sent: Thursday, May 27, 2004 4:44 AM Subject: Occurrence constraints Two quick questions. 1. Is it legal to have both minOccurs="0" and maxOccurs="0" specified for an element? 2. What is the best way to define SGML SDATA entities (i.e. eacute) for an XML document using XML Schema? Currently I am using the DOCTYPE to specify an "empty" DTD that does nothing but define the entities and a schema for the document structure. However, some XML parsers do not like this approach. Is there a better way of going about this? Thanks in advance. KeithReceived on Thursday, 3 June 2004 13:02:12 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:13:00 GMT