Logical Connectors

 <  Day Day Up  >  


Note in the previous example that the model group contains dt and dd , the names of element types that a <dl> tag may enclose. Note also the vertical bar separating dt and dd . This is a logical connector -a special symbol indicating how the content units it connects relate to each other. There are three logical connectors:

  •       Means "or" (one and only one of the connected content units must occur)

  • &       Means "and" (all of the connected content units must occur)

  • ,       Means "sequence" (the connected content units must occur in the specified order)

Thus, the content model in the previous declaration says that the <dl> tag must contain either a <dt> or <dl> tag and can contain any additional number of <dt> or <dd> tags.

  • ( )     Used to group content units together

Model groups can be nested inside other model groups. Very flexible content models can be declared by combining this with the capability to qualify content units with occurrence indicators and logical operators. The XHTML declaration for the <table> tag illustrates this point:

  <!ELEMENT table (caption?, (col*colgroup*), thead?, tfoot?, (tbody+tr+))>  

The content model for the table element type reads as follows :

  • Table content begins with zero or one < caption> tags.

  • This must be followed by a content group.

  • The content group must contain zero or more <col> tags or zero or more <colgroup> tags.

  • This must be followed by zero or one <thead> tags.

  • This must be followed by zero or one <tfoot> tags.

  • This must be followed by one or more <tbody> or <tr> tags.



 <  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