Occurrence Indicators

 <  Day Day Up  >  


In the previous example, also note the asterisk appended to the model group . This is an occurrence indicator -a special symbol that qualifies the element type or model group to which it is appended, indicating how many times it may occur. There are three occurrence indicators:

  • ?       Means optional and at most one occurrence (zero or one occurrence)

  • *       Means optional and any number of occurrences (zero or more occurrences)

  • +       Means at least one occurrence required (one or more occurrences)

Content models can also define an element type as containing element content, illustrated
by the SGML declaration for a definition list ( <DL> ) under HTML 4:

  <!ELEMENT DL - - (DT  DD)+>  

The XML declaration for dl under XHTML is again only slightly different as it omits the minimization information and cases the elements differently.

  <!ELEMENT dl (dt  dd)+>  


 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net