<!-- Example DTD -->

<!ENTITY % img "MyImage.gif">
<!ENTITY % foobar "xxx">

<!ENTITY foobar "xxx">
<!ENTITY outside  SYSTEM "entityValue">


<!ELEMENT entry3 ( (variables | (tmp, x)), (record)* , (a*, b,c,d, (e|f)) , (foo)+ ) >
<!ELEMENT dataset ( variables, ((record)* | tmp) ) >

<!ELEMENT entry1 ( variables, (record)* , (tmp | variable)* , (foo)* ) >
<!ELEMENT entry0 ( (variables | (tmp, x)), (record)* , (tmp | variable)* , (foo)* ) >
<!ELEMENT entry2 ( variables, (record)* , (tmp , variable)* , foo ) >

<!ELEMENT tmp  ( #PCDATA )  >


<!ELEMENT record  ( #PCDATA )  >
<!ELEMENT variable ( #PCDATA ) >
<!ELEMENT variables ( variable )* >


<!ELEMENT entry ( variables, (record)* , tmp  ) >


<!ATTLIST dataset 
     name        CDATA #REQUIRED
     numRecords  CDATA #IMPLIED
     source      CDATA #IMPLIED
>

<!ATTLIST  variables 
      count CDATA #IMPLIED
>

<!ATTLIST record
     id CDATA #REQUIRED
>

 <!-- Allow the name to be specified as an attribute -->
<!ATTLIST  variable
   type   CDATA #IMPLIED
   levels CDATA #IMPLIED
   unit   CDATA #IMPLIED
>

<!ATTLIST entry
    a CDATA #FIXED  "fixed a"
    c (one | two)  #IMPLIED
>
