<!DOCTYPE HTMLPLUS [
<!-- DTD for HTML+ (also known as HMML)
***************************************************************
******** WARNING THIS DOCUMENT IS UNDER CONSTRUCTION **********
********     send comments to dsr@hplb.hpl.hp.com    **********
********          or www-talk@nxoc01.cern.ch.        **********
********                                             **********
********    Dave Raggett, Thu 24-Jun-93 11:45:29     **********
***************************************************************

This DTD is parsed without errors by "sgmls -s -p htmlplus.dtd".
It still lacks the <!SGML> declaration and ISO Latin1

ToDo list:
=========

    *   Methods for mail, fax, queries, posting articles/responses ...
        Generalising actions beyond traversing simple hypertext links,
        and providing a means to exploit HTTP's range of methods.

    *   Support for change bars?

The guidelines in designing HTML+ were:

    *   Similar to HTML, so that most existing documents
        conforming to the HTML DTD are also HTML+ compliant
        A simple program will be made available to convert
        HTML documents into HTML+. You will be able to use it
        with "find" to convert all your files in one command!

    *   Fast and easy to render with modest programs, without
        the need for multiple parses, although that may be
        useful for more sophistocated styles of rendering.

    *   Suitable for most forms of online and printed material,
        based upon a detailed analysis of a reference books, fiction,
        newspapers, magazines and technical documentation. Hierarchical
        groupings can be defined extending across multiple documents,
        and used to represent books, chapters, sections, etc.

    *   Uses Internet URL's as a means of referencing external/remote
        documents, rather than SGML's formal public identifiers (which
        are based on ISO 9070 with ANSI as registration authority).

        The URL format is however, sensitive to changes in locations
        of documents, but this will be addressed by the proposed URN
        standard for universal resource numbering.

    *   HYTIME compability - See CommsACM Nov91 vol 34 p67-83 for review of HyTime.

        HyTime is designed for interchanging documents between different
        hypermedia systems, and doesn't address the hard bit which would
        be coping with URLs. It is now clear that HTML+ does fit into the
        general model described by HyTime, but not the detailed SGML
        constructs that HyTime specifies. This isn't a real problem, and
        it will be easy to map HTML+ documents into a HyTime compliant
        format using a suitable DTD. I therefore see now need right now
        to add HyTime specific constructs to the HTML+ DTD.

One most notable difference between HTML and HTML+ is the use of
containers. For example <P> is a container in HTML+ rather than
a separator. This change has been made to facilitate verification,
and to provide greater flexibility in specifying link destinations.

The major additions over HTML are:

    *   nested lists

    *   inline images and drawings

    *   embedded data in foreign formats
        for mathematical equations etc.

    *   tables with support for titles, and column headings
        and an ability to let entries/headings span columns

    *   forms - for querying or updating information sources
        and filling in questionaires for mailing or faxing

Links can now be anchored on a wide range of containers by using
value of the container's id attribute as part of a hypertext link.

Things dropped from HTML
------------------------

    *   MENU and DIR which are now handled as attributes to UL

    *   all inline emphasis is now handled with the EMPH tag

    *   PLAINTEXT, LIST and XMP have been obsoleted

    *   IMG (X Mosaic) now handled with FIG element

Common Attributes:
-----------------

    id      the id attribute allows authors to name elements such as
            headers and paragraphs as potential destinations for links.
            Note that links don't specify points, but rather extended
            objects.

    index   allows authors to specify how given headers etc should
            be indexed as primary or secondary keys.

              "/"     separates primary from secondary keys
              ";"     separates multiple entries

    href    Universal resource locations (references to documents)
 -->

<!-- ENTITY DECLARATIONS

 <!ENTITY % foo "X | Y | Z"> is a macro definition for parameters and
 in subsequent statements, the string "%foo;" is expanded to "X | Y | Z"

  Various classes of SGML text types:

    #CDATA   text which doesn't include markup or entity references

    #RCDATA  text with entity references but no markup

    #PCDATA  text occurring in a context in which markup and
            entity references may occur.
-->

<!ENTITY % URL      "CDATA" -- universal resource locator -->
<!ENTITY % text     "#PCDATA | A | ICON  | EMPH | EMBED | SP | BR">
<!ENTITY % paras    "P | PRE | FIG">
<!ENTITY % lists    "UL | OL | DL">
<!ENTITY % misc     "TBL | FORM | PANEL| GROUP">
<!ENTITY % heading  "H1|H2|H3|H4|H5|H6">
<!ENTITY % main     "%heading;|%misc;|%lists;|%paras;|%text;">

<!ENTITY % setup "(TITLE? & ISINDEX? & NEXTID? & LINK* & BASE?)">

<!ELEMENT HTMLPLUS O O ((HEAD, BODY) | ((%setup;), (%main;)*))>
<!ELEMENT HEAD - - (%setup;)>
<!ELEMENT BODY - - (%main;)*>

<!-- Document title -->
<!ELEMENT TITLE - - (#PCDATA | EM)+>
<!ATTLIST TITLE
    id      ID      #IMPLIED -- link destination --
    index   CDATA   #IMPLIED -- entries for index compilation -->

<!-- Floating panel which can be moved around relative
    to normal text flow. Often rendered with a different
    background and possibly framed. The panel can be
    anchored to a named point in the document as specified
    by the AT attribute. The panel may be placed at that
    point or after, but not before.
-->

<!ELEMENT PANEL - - (TITLE?, (%main;)*)>
<!ATTLIST PANEL
    id      ID      #IMPLIED -- defines link destination --
    at      NAME    #IMPLIED -- anchor point -->

<!-- Document headers -->
<!ELEMENT (%heading;) - - (#PCDATA | EM)+>
<!ATTLIST (%heading;)
    id      ID      #IMPLIED -- defines link destination --
    index   CDATA   #IMPLIED -- entries for index compilation -->

<!-- Inline emphasis with a role defined according to the
    type attribute. The following types are recommended:

    CITE        reference to named work (not author)
    PUB         a publication in which a cited work appears
    AUTHOR      author(s) of some cited work
    EDITOR      editor(s) of some cited work
    CREDIT      e.g. rights owner of photograph
    COPYRIGHT   copyright declarations
    ISBN        ISBN numbers
    FOOTNOTE    simple annotations (pop-ups or footnotes)
    DFN         defining instance of a term
    KBD         something the user would type
    CMD         command names, e.g. "chmod"
    ARG         command arguments e.g. "-I"
    VAR         named place holder e.g. "filename"
    INS         instance of named printer/directory/file etc.
    OPT         an option
    CODE        example of code
    SAMP        sequence of literal characters

 Authors can give rendering hints as separate attributes:

    <emph> default italic text </emph>
    <emph b> bold text </emph>
    <emph b i> bold italic text </emph>
    <emph sup> superscript text </emph>
    <emph type="dfn" b> a definition shown in bold </emph>

 Emphasis can be nested and it is up the the browser to
 decide how to deal with this. The simplest approach is
 to render according to the innermost style only.
-->

<!ELEMENT EMPH - - (%text;)*>
<!ATTLIST EMPH
    type    CDATA   #IMPLIED    -- logical category e.g. CITE --
    b       (b)     #IMPLIED    -- render in bold font --
    i       (i)     #IMPLIED    -- render in italic font --
    u       (u)     #IMPLIED    -- underline text --
    tt      (tt)    #IMPLIED    -- render in typewriter font --
    sup     (sup)   #IMPLIED    -- superscript --
    sub     (sub)   #IMPLIED    -- subscript --
    index   CDATA   #IMPLIED    -- entries for index compilation -->

<!-- Paragraphs
     <P STYLE="WARNING">

    The recognised styles are (for now):

        NORMAL      the default
        QUOTE       quoted text
        MARGIN      margin comments
        NOTE        advisory note
        CAUTION     warnings
        ERROR       bad bad news!

    Only one justification attribute
    should appear at a time.

    Browsers should avoid inserting extra vertical space when
    the P element follows immediately after a heading or
    other element causing a line break (except for BR).

    This ensures there is no penalty for starting paragraphs
    with <P>. Authors will want to do this when the text following
    a header has a particular style differing from normal.
 -->

<!ELEMENT P - O (%text;)+>
<!ATTLIST P
    id      ID          #IMPLIED    -- link destination --
    style   CDATA       normal      -- paragraph style --
    center  (center)    #IMPLIED    -- justification --
    left    (left)      #IMPLIED    -- the default --
    right   (right)     #IMPLIED    -- only one at a time -->

<!ELEMENT BR - O EMPTY -- line break -->

<!ELEMENT SP - O EMPTY -- unbreakable space -->

<!-- Preformatted text with fixed pitch font,
     respecting original spacing and newlines.
     The style attribute allows authors to specify
     alternative styles, e.g. "poem" which browsers
     could render in a proportional font.
 -->
<!ELEMENT PRE - - (%text;)+>
<!ATTLIST PRE
    id      ID      #IMPLIED -- link destination --
    style   CDATA   #IMPLIED -- various styles --
    width   NUMBER  #IMPLIED -- e.g. 40, 80, 132 -->

<!-- Lists which can be nested -->
<!ELEMENT OL - - (LI | UL | OL)+ -- ordered list -->
<!ATTLIST OL
        id      ID  #IMPLIED
        compact (compact) #IMPLIED>

<!ELEMENT UL - - (LI | UL | OL)+ -- unordered list -->
<!ATTLIST UL
    id      ID        #IMPLIED -- link destination --
    compact (compact) #IMPLIED -- reduced interitem spacing --
    narrow  (narrow)  #IMPLIED -- narrow perhaps multi columns -->

<!-- List items for UL and OL lists -->
<!ELEMENT LI - O (P|%text;)+>
<!ATTLIST LI id ID #IMPLIED>

<!-- Definition Lists (terms + defintions) -->
<!ELEMENT DL - - (DT,DD)+ -- DT and DD *MUST* be paired -- >
<!ATTLIST DL
        id      ID  #IMPLIED
        compact (compact) #IMPLIED>

<!ELEMENT DT - O (%text;)+ -- term text -- >
<!ELEMENT DD - O (P|QUOTE|UL|OL|%text;)+ -- definition text -- >
<!ATTLIST (DT|DD) id ID #IMPLIED>

<!-- Tables with titles and column headers

 Browsers need to carry out a pre-parse (e.g. when sizing
 the vertical scroll bar) in order to determine the number
 of columns and their widths.

    o   if a column only contains numbers or empty cells then
        align on units and set width to maxium precision needed
        (before and after decimal point, allowing for an exponent).
        This rule also applies when currency symbols are used.

    o   otherwise set column width to minimum of a threshold width
        and the maximum text length for all cells in the column.
        Text is left aligned and wrapped if it exceeds the chosen
        column width.

    o   By default, center headings but left justify other fields.

 The threshold column width can be set according to the number
 of columns and the width of the display window. It is also necessary
 to take the column headers into account in this process. Header text
 wraps to the next line if the column is too narrow. Browsers will
 normally center the header in the column.

 A complication occurs when a header or data cell spans more than
 one column, as specified by the "S" attribute. This can be used
 to give complex headers which share a header between columns
 followed by individual headers on the next line.

 Vertical gaps can be introduced with the <tb> element - this
 inserts 1/2 line space into next row. Header and Data rows
 can be intermixed. Authors can use alternate header and data rows
 when the rows alternate between text and numbers. The vertical
 alignment of numbers only applies to data fields.

 Tables which don't fit into this model should be defined as figures
 e.g. using Postscript, Tex or Computer Graphics Metafile.

 Example without format info:

                  An Example of a Table
    ____________________________________________________
    |          |          average          |   other   |
    |          |   height    |     weight  |  category |
    |__________________________________________________|
    | males    |    1.9      |      .003   |    yyy    |
    |__________________________________________________|
    | females  |    1.7      |      .002   |    xxx    |
    ____________________________________________________

    <tbl border>
        <tt> An Example of a Table
        <th> <td s="2"> average <td> other
        <th> <td> height <td> weight <td> category
        <tr> males <td> 1.9 <td> .003 <td> yyy
        <tr> females <td> 1.7 <td> .002 <td> xxx
    </tbl>

 Issue: should we allow complex data in table fields, e.g. lists
        headers and forms fields?
-->

<!ELEMENT TBL - - (TT?, (TH|TR|TB)*)>
<!ATTLIST TBL
    id      ID        #IMPLIED
    cols    CDATA     #REQUIRED -- column formats/number --
    compact (compact) #IMPLIED  -- if present use compact style --
    border  (border)  #IMPLIED  -- if present draw borders -->

<!ELEMENT TT - O (%text;)+ -- table title -->

<!ELEMENT TH - O ((%text;)+, TD*) -- a row of headers -->
<!ATTLIST TH
        S   NUMBER  1        -- columns spanned --
        L   (L)     #IMPLIED -- left justified --
        C   (C)     #IMPLIED -- center justified --
        R   (R)     #IMPLIED -- right justified -->

<!ELEMENT TR - O ((%text;)+, TD*) -- a row of data -->
<!ATTLIST TR
        S   NUMBER  1        -- columns spanned --
        L   (L)     #IMPLIED -- left justified --
        C   (C)     #IMPLIED -- center justified --
        R   (R)     #IMPLIED -- right justified -->

<!ELEMENT TD - O (%text;)+ -- cell data -->
<!ATTLIST TD
        S   NUMBER  1        -- columns spanned --
        L   (L)     #IMPLIED -- left justified --
        C   (C)     #IMPLIED -- center justified --
        R   (R)     #IMPLIED -- right justified -->

<!ELEMENT TB - O (EMPTY) -- vertical break of 1/2 line spacing -->

<!-- Forms: these are composed from input fields and selection menus

    These elements define fields which users can type into or select
    with mouse clicks. The browser should manage the input focus
    e.g. with the tab/shift tab keys and mouse clicks.

    The enter/return key is then taken to mean the use has filled
    in the form and wants the apppropriate action taken:

        -   send as query/update to WWW server
        -   email/fax to designated person

    The action is specified as a URL, e.g. "mailto:dsr@hplb.hpl.hp.com

    You can specify additional mail headers with the MH tag:

    <MH>Subject: Please add me to tennis tournament</MH>
 -->

<!ELEMENT FORM - - (MH*, (%main;|INPUT|SELECT)*)>
<!ATTLIST FORM
    id      ID        #IMPLIED
    action  %URL;     #IMPLIED>

<!ELEMENT MH - - CDATA -- RFC 822 header fields -->

<!ELEMENT INPUT - - (%text;)>
<!ATTLIST INPUT
    id      ID      #IMPLIED
    type    CDATA   #IMPLIED    -- URL, INT, FLOAT, DATE, BOOL, TEXT --
    width   CDATA   #IMPLIED    -- precision e.g."32x4" for multiline text --
    value   CDATA   #IMPLIED    -- the current value (yes/no for boolean fields) --
    disabled (disabled) #IMPLIED    -- if grayed out --
    error   (error)    #IMPLIED    -- if in error -->

<!-- Menu selections one from many and many from many

  The compact attribute is a suggestion that the browser renders
  the list in compact style, e.g. as a dropdown menu.

  The multi attribute means the menu permits multiple selections -->

<!ELEMENT SELECT - - ((%text;)*, ITEM*)>
<!ATTLIST SELECT
    id      ID        #IMPLIED
    compact (compact) #IMPLIED
    multi   (multi)   #IMPLIED>

<!-- menu items with attributes for menu selections -->
<!ELEMENT ITEM - O (%text;)>
<!ATTLIST ITEM
    id          ID         #IMPLIED
    selected    (selected) #IMPLIED -- if selected in list -- 
    disabled    (disabled) #IMPLIED -- if grayed out --
    error       (error)    #IMPLIED -- if in error -->

<!-- Embedded Data

    You can embed information in a foreign format
    into the HTML+ document. This is very convenient
    for mathematical equations and simple drawings.
    Images and complex drawings are better specified
    as linked documents using the FIG or ICON elements.

    Arbitrary 8 bit data is allowed but any
    occurrences of the following chars must
    be escaped as shown:

        "&"     by      "&amp;"
        "<"     by      "&lt;"
        ">"     by      "&gt;"

    The browser can pipe such data thru filters
    to generate the corresponding pixmap

    The data format is specified as a MIME
    content type, e.g. "text/eqn"
-->

<!ELEMENT EMBED - - (RCDATA)>
<!ATTLIST EMBED
    id      ID      #IMPLIED
    type    CDATA   #IMPLIED -- mime content type -->

<!-- Figures

    Figures can be fixed to the point in the text flow where
    they should appear or may float relative to the text.

    The image/drawing is specified by a URL or as embedded
    data for simple drawings. The elements text serves
    as the caption. Use the CREDIT emphasis to record
    photo credits etc.

    Mouse clicks can be handled by server or browser (FIGA)
    The coordinate scheme is (0,0) for lower left and (1,1)
    for the upper right of the figure with X to the right
    and Y up the "page". When sending clicks to the server
    append to URL as in:   URL?X,Y

    Clicks on areas designated with FIGA should take
    preference over handling by the server.
-->

<!ELEMENT FIG - - (EMBED?, FIGA*, (%text;)*)>
<!ATTLIST FIG
    id      ID      #IMPLIED
    float  (float)  #IMPLIED -- fixed or floating figures --
    ismap  (ismap)  #IMPLIED -- clicks are handled by server --
    src     %URL;   #IMPLIED -- link to image data -->

<!-- Figure anchors designate polygonal areas on the figure
    which can be clicked with the mouse. The default area
    is the whole of the figure. This mechanism interprets
    mouse clicks locally, and browsers can choose to highlight
    the designated area (or change the mouse sprite) when the
    mouse is moved over the area.

    Note that polygons may be non-convex or even intersect
    themselves, thereby complicating the definition of what
    is enclosed by the polygon. Holes are excluded.
-->

<!ELEMENT FIGA - O (EMPTY)>
<!ATTLIST FIGA
    href    %URL;   #REQUIRED   -- link to traverse when clicked --
    area    NUMBERS #IMPLIED    -- x1,y1,x2,y2,x3,y3,... -->

<!-- inline icons/small graphics -->
<!ELEMENT ICON - O EMPTY>
<!ATTLIST ICON src %URL; #REQUIRED -- where to get image data -->

<!-- Hierarchical groups for books, chapters, sections etc. -->
<!ELEMENT GROUP - - ((TITLE|LINK*), (%main;)*)>
<!ATTLIST GROUP
    id      ID      #IMPLIED
    type    CDATA   #IMPLIED -- book, chapter, section etc. --
    inset   (inset) #IMPLIED -- rendering hint: indent margins -->

<!-- Hypertext Links

        href    names the linked document

        rel     the type of relationship

        urn     the Universal Resource Number
                for the linked document
    
        title   when this isn't part of the linked
                document, e.g. Gopher menus

        methods which HTTP methods are "known" to
                be available for the linked document

    Use rel="partof" when you want to specify that
    the linked document is really part of this one,
    as opposed to a reference to a related document.

    I can't think why we want the methods attribute
    and will remove it unless anyone objects.
 -->
<!ELEMENT A - - (PCDATA | ICON | EMPH | EMBED)*>
<!ATTLIST A
    name    NMTOKEN #IMPLIED -- as target of link --
    href    %URL;   #IMPLIED -- hypertext reference --
    rel     CDATA   #IMPLIED -- type of relationship --
    urn     CDATA   #IMPLIED -- universal resource number --
    title   CDATA   #IMPLIED -- when otherwise unavailable --
    methods NAMES   #IMPLIED -- supported public methods -->    

<!-- Other kinds of relationships between documents
     The attributes are identical to the A tag -->
<!ELEMENT LINK - O EMPTY>
<!ATTLIST LINK
    name    NMTOKEN #IMPLIED -- as target of link --
    href    %URL;   #IMPLIED -- hypertext reference --
    rel     CDATA   #IMPLIED -- type of relationship --
    urn     CDATA   #IMPLIED -- universal resource number --
    title   CDATA   #IMPLIED -- when otherwise unavailable --
    methods NAMES   #IMPLIED -- supported public methods -->

<!-- Original document URL for resolving relative URLs  -->
<!ELEMENT BASE - O EMPTY>
<!ATTLIST BASE HREF %URL; #IMPLIED>

<!-- Signifies the document URL accepts queries -->
<!ELEMENT ISINDEX - O (EMPTY)>

<!-- Don't reuse ids, allocate next starting from this one.
  This element is for use with autonumbering editors -->
<!ELEMENT NEXTID - O (EMPTY)>
<!ATTLIST NEXTID N NAME #REQUIRED>

]>

