Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get around the "xs:group cannot be placed inside xs:all" limitation?
    text
    copied!<p>Is there any reason why <code>&lt;xs:group&gt;</code> cannot appear inside <code>&lt;xs:all&gt;</code>, but only inside <code>&lt;xs:sequence&gt;</code>?</p> <p>Let's see an example. Say, there is a list of tags (<code>&lt;a&gt;</code> to <code>&lt;d&gt;</code> and <code>&lt;e&gt;</code> to <code>&lt;f&gt;</code> - see example below) which do not appear in any particular order, but always wrapped into another object (either <code>&lt;foo&gt;</code> or <code>&lt;bar&gt;</code>); <code>&lt;foo&gt;</code>={<code>&lt;a&gt;</code>, <code>&lt;b&gt;</code>, <code>&lt;c&gt;</code>, <code>&lt;d&gt;</code>}; <code>&lt;bar&gt;</code>={<code>&lt;e&gt;</code>, <code>&lt;b&gt;</code>, <code>&lt;c&gt;</code>, <code>&lt;f&gt;</code>}:</p> <pre><code>&lt;foo&gt; &lt;a&gt;a1&lt;/a&gt; &lt;b&gt;b1&lt;/b&gt; &lt;c&gt;c1&lt;/c&gt; &lt;d&gt;d1&lt;/d&gt; &lt;/foo&gt; &lt;foo&gt; &lt;d&gt;d2&lt;/d&gt; &lt;b&gt;b2&lt;/b&gt; &lt;c&gt;c2&lt;/c&gt; &lt;a&gt;a2&lt;/a&gt; &lt;/foo&gt; &lt;bar&gt; &lt;e&gt;e3&lt;/e&gt; &lt;b&gt;b3&lt;/b&gt; &lt;c&gt;c3&lt;/c&gt; &lt;f&gt;f3&lt;/f&gt; &lt;/bar&gt; </code></pre> <p>I want to extract tags <code>&lt;b&gt;</code> and <code>&lt;c&gt;</code> into <code>xs:group</code> and use <code>&lt;xs:group ref="..."&gt;</code> when defining <i>complexType</i> of <code>&lt;foo&gt;</code> and <code>&lt;bar&gt;</code> in the XSD. However, due to the restriction mentioned above, this is not possible. </p> <p>What would you suggest as a workaround for the given problem? Chances are, I am doing something stupid, but again why is this incorrect?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload