title: Defining an XML element that must be empty or decimal
body: <p>I have the following XSD which was generated by VS from an example XML file:</p>
  
  <pre><code>                &lt;xs:element name="amperage_rating"&gt;
                    &lt;xs:complexType&gt;
                      &lt;xs:simpleContent&gt;
                        &lt;xs:extension base="xs:decimal"&gt;
                          &lt;xs:attribute name="unit" type="xs:string" use="required" /&gt;
                        &lt;/xs:extension&gt;
                      &lt;/xs:simpleContent&gt;
                    &lt;/xs:complexType&gt;
                  &lt;/xs:element&gt;
  </code></pre>
  
  <p>which demands a numeric value. But sometimes the value is not known and this must also be allowed:</p>
  
  <pre><code>&lt;amperage_rating unit="A"&gt;&lt;/amperage_rating&gt;
  </code></pre>
  
  <p>I've tried nillable="true" but it had no effect. I have also tried to define a union with a 0-length string but that keeps saying it is "not supported in this context". </p>
  
  <p>So how do I adjust the XSD to allow this? </p>