title: Is this the right way to make a dtd?
body: <p>if i have an xml file like this:</p>
  
  <pre><code>&lt;books&gt;
      &lt;book&gt;
  
          &lt;title&gt;&lt;/title&gt;
          &lt;subtitle&gt;&lt;/subtitle&gt;
          &lt;info language=""&gt;
  
              &lt;pages&gt;&lt;/pages&gt;
              &lt;chapters&gt;&lt;/chapters&gt;
  
          &lt;/info&gt;
  
          &lt;author&gt;&lt;/author&gt;
  
      &lt;/book&gt;
      .
      .
      .
  &lt;/books&gt;
  </code></pre>
  
  <p>which one of this is the right dtd?
  FIRST WAY</p>
  
  <pre><code>    &lt;!ELEMENT books(book+)&gt;
      &lt;!ELEMENT book(title,subtitle,info,author)&gt;
      &lt;!ELEMENT title (#PCDATA)&gt;
      &lt;!ELEMENT subtitle (#PCDATA)&gt;
      &lt;!ELEMENT info(pages,chapters)&gt;
      &lt;!ELEMENT pages (#PCDATA)&gt;
      &lt;!ELEMENT chapters(#PCDATA)&gt;
      &lt;!ELEMENT author(#PCDATA)&gt;
      &lt;!ATTLIST info language CDATA #REQUIRED&gt;
  </code></pre>
  
  <p>SECOND WAY </p>
  
  <pre><code>   &lt;!ELEMENT books(book+)&gt;
     &lt;!ELEMENT book(title,subtitle,info,author)&gt;
     &lt;!ELEMENT info(pages,chapters)&gt;
     &lt;!ELEMENT title (#PCDATA)&gt;
     &lt;!ELEMENT subtitle (#PCDATA)&gt;
     &lt;!ELEMENT pages (#PCDATA)&gt;
     &lt;!ELEMENT chapters(#PCDATA)&gt;
     &lt;!ELEMENT author(#PCDATA)&gt;
     &lt;!ATTLIST info language CDATA #REQUIRED&gt;
  </code></pre>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>If i have  a nested node do i write it at the start or as soon is encounter it?</li>
  <li>Can i write attributes at the bottom or as soon is encounter it?</li>
  </ol>
  
  <p>thanx if anyone will reply and sorry for my english.</p>