title: How do I restrict certain words by using the pattern restriction in XSD?
body: <p>Is there a way to restrict certain words from being allowed by using the pattern restriction in XSD?  </p>
  
  <p>The XML file will contain certain variable names.  All names are allowed except for 3 reserved names, let's call them red, green, and blue.  The reserved names would most likely never be used anyway, but I need to validate that using the XSD file.  Below is an example of what the XSD would look like if I was to allow only those names.  Is there any way to negate this though?</p>
  
  <pre><code>&lt;xs:simpleType name="ParameterName"&gt;
      &lt;xs:restriction base="xs:string"&gt;
           &lt;xs:pattern value="red|green|blue"/&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt; 
  </code></pre>