title: Define an element as non-empty in RelaxNG
body: <p>I've started using RelaxNG to specify XML message schemas, and using PHP DOMDocument to validate and parse incoming messages, but can't figure out how to define a text node so that it cannot be empty. Example schema:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;element name="amhAPI" xmlns="http://relaxng.org/ns/structure/1.0"&gt;
      &lt;element name="auth"&gt;
          &lt;element name="validateUser"&gt;
              &lt;element name="username"&gt;
                  &lt;text/&gt;
              &lt;/element&gt;
  
              &lt;element name="password"&gt;
                  &lt;text/&gt;
              &lt;/element&gt;
          &lt;/element&gt;
      &lt;/element&gt;
  &lt;/element&gt;
  </code></pre>
  
  <p>However, the message below is being validated as correct by the <a href="http://au.php.net/manual/en/domdocument.relaxngvalidate.php" rel="nofollow">DOMDocument::relaxNGValidate</a> method (since relaxng <a href="http://relaxng.org/spec.html#text-pattern" rel="nofollow">matches any arbitrary string</a> [including an empty one] with the <code>text</code> pattern) and  is equivalent to ):</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;amhAPI&gt;
      &lt;auth&gt;
          &lt;validateUser&gt;
              &lt;username/&gt;
              &lt;password/&gt;
          &lt;/validateUser&gt;
      &lt;/auth&gt;
  &lt;/amhAPI&gt;
  </code></pre>
  
  <p>Because of this, I have to add in a bunch of checks and validation for fields that are not supposed to be empty, which could be removed if the validator identified them as non-empty elements.</p>
  
  <p>Is there a way to force non-empty text?</p>