title: How can I define an XML schema element that allows either base64 content or an xop:Include element?
body: <p>I have a XML schema that defines an element that may be either base64 text or an xop:Include element.  Currently, this is defined as a base64Binary type:</p>
  
  <pre><code>&lt;xs:element name="PackageBinary" type="xs:base64Binary" minOccurs="1" maxOccurs="1"/&gt;
  </code></pre>
  
  <p>When I insert the xop:Include element instead, it looks like this:</p>
  
  <pre><code>&lt;PackageBinary&gt;
      &lt;xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="http://google.com/data.bin" /&gt;
  &lt;/PackageBinary&gt;
  </code></pre>
  
  <p>But this gives an XML validation error (I'm using .NET validator):</p>
  
  <blockquote>
    <p>The element 'mds:xml-schema:soap11:PackageBinary' cannot contain child
    element '<a href="http://www.w3.org/2004/08/xop/include:Include" rel="nofollow">http://www.w3.org/2004/08/xop/include:Include</a>' because the
    parent element's content model is text only.</p>
  </blockquote>
  
  <p>This makes sense because it's not base64 content, but I thought this was common practice...?  Is there any way to support this in the schema?  (We have existing product that supports this syntax but we are adding validation now.)</p>