title: c# XDocument Xsd pattern validation with character $
body: <p>I have a problem with c# XDocument XSD validation.</p>
  
  <p>The following file is validated well by Xml Spy, but not by .Net (c#)</p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Simple.xsd"&gt;
      &lt;Var Name="$Toto"/&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Schema</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt;
      &lt;xs:element name="Root"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name="Var"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:attribute name="Name" type="ST_VariableIdentifier" use="required"/&gt;
                      &lt;/xs:complexType&gt;
                  &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
          &lt;xs:simpleType name="ST_VariableIdentifier"&gt;
          &lt;xs:restriction base="xs:string"&gt;
              &lt;xs:pattern value="$[a-z,A-Z]*"/&gt;
          &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>An idea?</p>