title: XSD 1.1 alternative test the contents of text()
body: <p>Here is what I would like to do:</p>
  
  <pre><code>&lt;xs:element name="width"&gt;
    &lt;!-- If the value is auto, then it can have min/max attribs --&gt;
    &lt;xs:alternative test="text() eq auto" type="heightWidthAutoType" /&gt;
    &lt;!-- Otherwise it is treated as a normal positionType --&gt;
    &lt;xs:alternative type="positionType" /&gt;
  &lt;/xs:element&gt;    
  </code></pre>
  
  <p>This should apply to the first alternative (but doesn't):</p>
  
  <pre><code>&lt;width min='100' max='100'&gt;auto&lt;/width&gt;
  </code></pre>
  
  <p>This one for the default:</p>
  
  <pre><code>&lt;width&gt;100&lt;/width&gt;
  </code></pre>
  
  <p>No matter what I put in for the contents of the tag, it always chooses the default.  I'm assuming text() isn't valid in an alternative, but I can't seem to find the documentation saying that.</p>
  
  <p><a href="http://www.w3.org/TR/xmlschema11-1/#cTypeAlternative" rel="nofollow">W3 Reference</a></p>