title: How to define XSD to allow any element
body: <p>I want to define an xsd for a parameter element which will allow me to define the parameter in the following manners </p>
  
  <pre><code>&lt;parameter name="save.type" value="attribute" /&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;parameter name="payload"&gt;
          &lt;p:AdderProcessRequest xmlns:p="http://wso2.org/bps/sample"&gt;
              &lt;!--Exactly 1 occurrence --&gt;
              &lt;x xmlns="http://wso2.org/bps/sample"&gt;{@xvalue}&lt;/x&gt;
              &lt;!--Exactly 1 occurrence --&gt;
              &lt;y xmlns="http://wso2.org/bps/sample"&gt;{@yvalue}&lt;/y&gt;
          &lt;/p:AdderProcessRequest&gt;
  &lt;/parameter&gt;
  </code></pre>
  
  <p>In the second approach the xml content within the parameter element is not known beforehand so it can be anything.</p>
  
  <p>The following is the xsd i created but it doesn't seem to work. </p>
  
  <pre><code>&lt;xs:element name="parameter" maxOccurs="unbounded" minOccurs="0"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:any minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute type="xs:string" name="name" use="optional"/&gt;
          &lt;xs:attribute type="xs:string" name="value" use="optional"/&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>Any help with this will be much appreciated.
  Thanks in advance </p>