title: structure of an external grammar in voicexml
body: <p>how does the structure of an external vxml grammar looks like?</p>
  
  <p>at the moment i have following inline grammar:</p>
  
  <pre><code>&lt;grammar root="main" version="1.0" xml:lang="de-DE"&gt;
  
    &lt;rule id="main" scope="public"&gt;
      &lt;one-of&gt;
        &lt;item&gt; 1 &lt;/item&gt;
        &lt;item&gt; 2 &lt;/item&gt;
        &lt;item&gt;3 &lt;/item&gt;
        &lt;item&gt; 4&lt;/item&gt;
      &lt;/one-of&gt;
    &lt;/rule&gt;
  
  &lt;/grammar&gt;
  </code></pre>
  
  <p>instead of this inline grammar i want to write </p>
  
  <pre><code>&lt;grammar src = "mygrammar.grxml" type="application/srgs+xml" /&gt;
  </code></pre>
  
  <p>and refer to the external grammar.</p>
  
  <p>can I just copy the inline grammar and put it in mygrammer.grxml?</p>
  
  <p>or do I need somemore lines of code?</p>
  
  <p>thanks in advance</p>
  
  <p>----EDIT----</p>
  
  <p>now where earlier my inline grammar was, i have</p>
  
  <pre><code>&lt;grammar src = "grammar_produkte.grxml" type="application/srgs+xml" /&gt;
  </code></pre>
  
  <p>and my external grammar looks like this (like you said):</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;grammar root="main" version="1.0" xml:lang="de-DE"&gt;
  
    &lt;rule id="main" scope="public"&gt;
      &lt;one-of&gt;
        &lt;item&gt; 1 &lt;/item&gt;
        &lt;item&gt; 2 &lt;/item&gt;
        &lt;item&gt; 3 &lt;/item&gt;
        &lt;item&gt; 4 &lt;/item&gt;
      &lt;/one-of&gt;
    &lt;/rule&gt;
  &lt;/grammar&gt;
  </code></pre>
  
  <p>but it doesn't work. It says, that an error occurred and that the application stops.
  Did i do something wrong?
  The file is in the same directory like the .vxml.</p>
  
  <p>I Use MS Speech Server 2007</p>
  
  <p>----------------Edit-------</p>
  
  <p>Hello,</p>
  
  <p>I'm referencing to the grammar file with:</p>
  
  <pre><code>&lt;grammar src = "grammar_produkte2.grxml" type="application/srgs+xml"  /&gt;
  </code></pre>
  
  <p>In addition to the grammar i used before, now I use this example (from the website):</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
  
  &lt;grammar xml:lang="de-DE" 
  tag-format="semantics-ms/1.0" version="1.0" 
  root="Root" mode="voice" 
  xmlns="http://www.w3.org/2001/06/grammar" 
  xmlns:sapi=
  "http://schemas.microsoft.com/
  Speech/2002/06/SRGSExtensions"&gt;
  
  
      &lt;rule id="produkte" scope="public"&gt;
         &lt;one-of&gt;
          &lt;item&gt;
            &lt;item&gt;ham&lt;/item&gt;
            &lt;tag&gt;$._value = "ham"&lt;/tag&gt;
          &lt;/item&gt;
          &lt;item&gt;
            &lt;item&gt;roast beef&lt;/item&gt;
            &lt;tag&gt;$._value = "roast beef"&lt;/tag&gt;
          &lt;/item&gt;
          &lt;item&gt;
            &lt;item&gt;italian&lt;/item&gt;
            &lt;tag&gt;$._value = "italian"&lt;/tag&gt;
          &lt;/item&gt;
        &lt;/one-of&gt;
       &lt;/rule&gt;
   &lt;/grammar&gt;
  </code></pre>
  
  <p>I tried it with mode=voice and dtmf.</p>
  
  <p>Do I need anything else expect the speech server?
  The Files are in the same folder.</p>