Example 14     <<      >>       intro       contents     

If an attribute is implied, a default value can be provided for the case when the attribute is not used.

  DTD   HOME     

Both attributes are implied. Their default value is given.:

               <!ELEMENT XXX (AAA+, BBB+)>
               <!ELEMENT AAA (#PCDATA)>
               <!ELEMENT BBB (#PCDATA)>
               <!ATTLIST AAA 
                              true ( yes | no ) "yes">
               <!ATTLIST BBB 
                    month NMTOKEN "1">          
                    
               
            


  Valid documents   HOME     

The values of true are yes, no and yes. The values of month are 8, 2 and 1.:

               <!DOCTYPE tutorial SYSTEM "tutorial.dtd">

               <XXX>
                    <AAA true="yes"/>
                    <AAA true="no"/>
                    <AAA/>
                    <BBB month="8" />
                    <BBB month="2" />
                    <BBB/>
               </XXX>