Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2002
    Central New York
    Thanked 0 Times in 0 Posts

    What are "- -", "- o" and "oo"?

    W3's HTML 4.01 DTD uses "- -", "- o" and "o o" in ELEMENT entries between the element name and it's content model. For example:

    <!ELEMENT P - o (%inline;)* -- paragraph -->
    <!ELEMENT (%heading;) - - (%inline;)* -- heading -->
    <!ELEMENT TBODY o o (TR)+ -- table body -->

    I've searched the net and can't find any mention of them. And all the XML books I have don't have them. What are they and what do they mean?
    Last edited by Alex Vincent; 02-18-2003 at 03:58 PM.
    Timothy Boronczyk

  2. #2
    Regular Coder
    Join Date
    Jun 2002
    Newcastle, England
    Thanked 0 Times in 0 Posts
    The explanation is in the HTML 4.01 spec - it just takes some finding. Here's an excerpt which should show you where to look:


    3.3.3 Element declarations

    The bulk of the HTML DTD consists of the declarations of element types and their attributes. The <!ELEMENT keyword begins a declaration and the > character ends it. Between these are specified:

    1. The element's name.
    2. Whether the element's tags are optional. Two hyphens that appear after the element name mean that the start and end tags are mandatory. One hyphen followed by the letter "O" indicates that the end tag can be omitted. A pair of letter "O"s indicate that both the start and end tags can be omitted.
    3. The element's content, if any. The allowed content for an element is called its content model. Element types that are designed to have no content are called empty elements. The content model for such element types is declared using the keyword "EMPTY".

    In this example:

    <!ELEMENT UL - - (LI)+>

    * The element type being declared is UL.
    * The two hyphens indicate that both the start tag <UL> and the end tag </UL> for this element type are required.
    * The content model for this element type is declared to be "at least one LI element". Below, we explain how to specify content models.

    This example illustrates the declaration of an empty element type:


    * The element type being declared is IMG.
    * The hyphen and the following "O" indicate that the end tag can be omitted, but together with the content model "EMPTY", this is strengthened to the rule that the end tag must be omitted.
    * The "EMPTY" keyword means that instances of this type must not have content.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts