<br><font size=2 face="sans-serif">I did some investigation.</font>
<br>
<br><font size=2 face="sans-serif">1) xs:any wildcards are not allowed
inside xs:all groups at all. </font>
<br>
<br><font size=2 face="sans-serif">2) The schema below is valid, and admits
the instance document following it:</font>
<br>
<br><font size=2 face="sans-serif">&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;&lt;xsd:element name=&quot;x&quot;&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp;&lt;xsd:complexType&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;xsd:sequence&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:element name=&quot;name&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:element name=&quot;address&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:any processContents=&quot;lax&quot;
minOccurs='0' maxOccurs='unbounded'/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/xsd:sequence&gt;</font>
<br><font size=2 face="sans-serif">&lt;/xsd:complexType&gt;</font>
<br><font size=2 face="sans-serif">&lt;/xsd:element&gt;</font>
<br>
<br><font size=2 face="sans-serif">&lt;/xsd:schema&gt;</font>
<br>
<br><font size=2 face="sans-serif">Here's the instance:</font>
<br>
<br><font size=2 face="sans-serif">&lt;?xml version=&quot;1.0&quot;?&gt;</font>
<br><font size=2 face="sans-serif">&lt;x&gt;</font>
<br><font size=2 face="sans-serif">&lt;name/&gt;</font>
<br><font size=2 face="sans-serif">&lt;address/&gt;</font>
<br><font size=2 face="sans-serif">&lt;foo/&gt;</font>
<br><font size=2 face="sans-serif">&lt;bar/&gt;</font>
<br><font size=2 face="sans-serif">&lt;quux/&gt;</font>
<br><font size=2 face="sans-serif">&lt;frobboz/&gt;</font>
<br><font size=2 face="sans-serif">&lt;/x&gt;</font>
<br>
<br><font size=2 face="sans-serif">3) Note however, the only way to create
an XML Schema which will validate both the instance above and the one below
where the order is all scrambled, is an array-of-choice schema:</font>
<br>
<br><font size=2 face="sans-serif">&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;&lt;xsd:element name=&quot;x&quot;&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp;&lt;xsd:complexType&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;xsd:choice maxOccurs='unbounded'&gt;
&lt;!-- array of choice --&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:element name=&quot;name&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:element name=&quot;address&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;xsd:any processContents=&quot;lax&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/xsd:choice&gt;</font>
<br><font size=2 face="sans-serif">&lt;/xsd:complexType&gt;</font>
<br><font size=2 face="sans-serif">&lt;/xsd:element&gt;</font>
<br>
<br><font size=2 face="sans-serif">&lt;/xsd:schema&gt;</font>
<br>
<br><font size=2 face="sans-serif">This array-of-choice schema will accept
this instance document also:</font>
<br>
<br><font size=2 face="sans-serif">&lt;?xml version=&quot;1.0&quot;?&gt;</font>
<br><font size=2 face="sans-serif">&lt;x&gt;</font>
<br><font size=2 face="sans-serif">&lt;foo/&gt;</font>
<br><font size=2 face="sans-serif">&lt;address/&gt;</font>
<br><font size=2 face="sans-serif">&lt;bar/&gt;</font>
<br><font size=2 face="sans-serif">&lt;name/&gt;</font>
<br><font size=2 face="sans-serif">&lt;quux/&gt;</font>
<br><font size=2 face="sans-serif">&lt;frobboz/&gt;</font>
<br><font size=2 face="sans-serif">&lt;/x&gt;</font>
<br>
<br><font size=2 face="sans-serif">The above array-of-choice schema obviously
will also accept things where there are multiple name and address entries,
which is undesirable, but the XPath expressions x/name and x/address will
still work. </font>
<br>
<br><font size=2 face="sans-serif">&lt;?xml version=&quot;1.0&quot;?&gt;</font>
<br><font size=2 face="sans-serif">&lt;x&gt;</font>
<br><font size=2 face="sans-serif">&lt;address/&gt;</font>
<br><font size=2 face="sans-serif">&lt;address/&gt;</font>
<br><font size=2 face="sans-serif">&lt;foobar/&gt;</font>
<br><font size=2 face="sans-serif">&lt;/x&gt;</font>
<br>
<br><font size=2 face="sans-serif">Implications for DFDL: I suggest we
should allow dimension on any wildcards because this unordered sequence
DFDL fragment:</font>
<br>
<br><font size=2 face="sans-serif">&lt;xsd:sequence dfdl:ordered=&quot;false&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;xsd:element name=&quot;name&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;xsd:element name=&quot;address&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;xsd:any id=&quot;unknown&quot;
processContents=&quot;lax&quot; minOccurs='0' maxOccurs='unbounded'/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp;&lt;/xsd:sequence&gt;</font>
<br>
<br><font size=2 face="sans-serif">describes something quite useful which
otherwise requires an array of choice to model. </font>
<br>
<br><font size=2 face="sans-serif">Array-of-choice is generally undesirable
as a model because it loses the cardinality information that says that
name is required and address is required and there can be exactly 1 instance
of each. </font>
<br>
<br><font size=2 face="sans-serif">...mikeb</font>
<br>
<br><font size=2 face="sans-serif">Mike Beckerle<br>
STSM, Architect, Scalable Computing<br>
IBM Software Group<br>
Information Platform and Solutions<br>
Westborough, MA 01581<br>
direct: voice and FAX 508-599-7148<br>
assistant: Pam Riordan &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;priordan@us.ibm.com
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;508-599-7046<br>
<br>
</font>