Annotation of libwww/Library/src/HTMLPDTD.html, revision 2.27

2.7       frystyk     1: <HTML>
                      2: <HEAD>
2.23      frystyk     3: <TITLE>W3C Sample Code Library libwww HTML DTD</TITLE>
2.22      frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen, 28-Jun-1996 -->
2.7       frystyk     5: </HEAD>
                      6: <BODY>
                      7: 
                      8: <H1>HTML Plus DTD - Software Interface</H1>
                      9: 
                     10: <PRE>
                     11: /*
2.12      frystyk    12: **     (c) COPYRIGHT MIT 1995.
2.7       frystyk    13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
                     16: 
                     17: SGML purists should excuse the use of the term "DTD" in this file to
                     18: represent DTD-related information which is not exactly a DTD
                     19: itself. The C modular structure doesn't work very well here, as the
                     20: dtd is partly in the .h and partly in the .c which are not very
                     21: independent.  <EM>Tant pis!</EM> There are a couple of HTML-specific
                     22: utility routines also defined. <P>
                     23: 
                     24: This module is a part of the <A
2.26      frystyk    25: HREF="http://www.w3.org/Library/">
2.23      frystyk    26: W3C Sample Code Library</A>.
2.7       frystyk    27: 
2.6       timbl      28: <PRE>
                     29: #ifndef HTMLDTD_H
2.1       timbl      30: #define HTMLDTD_H
                     31: 
2.15      frystyk    32: #include "HTStruct.h"
2.9       frystyk    33: #include "SGML.h"
                     34: </PRE>
                     35: 
                     36: <H2>Entity numbers</H2>
2.6       timbl      37: 
                     38: The entity names are defined in the C file.  This gives the number of them.
2.9       frystyk    39: 
2.10      frystyk    40: <H2>Element Numbers</H2>
                     41: 
2.9       frystyk    42: <PRE>
2.21      frystyk    43: #define HTML_ENTITIES 67
2.9       frystyk    44: </PRE>
2.6       timbl      45: 
2.9       frystyk    46: Must Match all tables by element!  These include tables in <A
                     47: HREF="HTMLPDTD.c" NAME="z1">HTMLPDTD.c</A> and code in <A
                     48: HREF="HTML.c" NAME="z0">HTML.c</A>.<P>
2.1       timbl      49: 
2.9       frystyk    50: Differences from Internet Draft 00: HTML, H7,PLAINTEXT LISTINGand XMP
                     51: left in.
2.6       timbl      52: 
2.9       frystyk    53: <PRE>
2.6       timbl      54: typedef enum _HTMLElement {
2.1       timbl      55:        HTML_A, 
                     56:        HTML_ABBREV,
                     57:        HTML_ABSTRACT,
                     58:        HTML_ACRONYM,
                     59:        HTML_ADDED,
                     60:        HTML_ADDRESS,
                     61:        HTML_ARG,
                     62:        HTML_B,
                     63:        HTML_BASE,
                     64:        HTML_BLOCKQUOTE,
                     65:        HTML_BODY,
                     66:        HTML_BOX,
                     67:        HTML_BR,
                     68:        HTML_BYLINE,
                     69:        HTML_CAPTION,
                     70:        HTML_CHANGED,
                     71:        HTML_CITE,
                     72:        HTML_CMD,
                     73:        HTML_CODE,
                     74:        HTML_COMMENT,
                     75:        HTML_DD,
                     76:        HTML_DFN,
                     77:        HTML_DIR,
                     78:        HTML_DL,
                     79:        HTML_DT,
                     80:        HTML_EM,
                     81:        HTML_FIG,
                     82:        HTML_FOOTNOTE,
                     83:        HTML_FORM,
2.27    ! frystyk    84:        HTML_FRAME,
        !            85:        HTML_FRAMESET,
2.1       timbl      86:        HTML_H1,
                     87:        HTML_H2,
                     88:        HTML_H3,
                     89:        HTML_H4,
                     90:        HTML_H5,
                     91:        HTML_H6, 
                     92:        HTML_H7,
                     93:        HTML_HEAD,
                     94:        HTML_HR,
                     95:        HTML_HTML,
                     96:        HTML_HTMLPLUS,
                     97:        HTML_I,
                     98:        HTML_IMAGE,
                     99:        HTML_IMG,
                    100:        HTML_INPUT,
                    101:        HTML_ISINDEX,
                    102:        HTML_KBD,       
                    103:        HTML_L,
                    104:        HTML_LI,
                    105:        HTML_LINK,
                    106:        HTML_LISTING,
                    107:        HTML_LIT,
                    108:        HTML_MARGIN,
                    109:        HTML_MATH,
                    110:        HTML_MENU,
2.25      frystyk   111:        HTML_META,
2.1       timbl     112:        HTML_NEXTID,
2.27    ! frystyk   113:        HTML_NOFRAMES,
2.1       timbl     114:        HTML_NOTE,
                    115:        HTML_OL,
                    116:        HTML_OPTION,
                    117:        HTML_OVER,
                    118:        HTML_P,
                    119:        HTML_PERSON,
                    120:        HTML_PLAINTEXT,
                    121:        HTML_PRE,
                    122:        HTML_Q,
                    123:        HTML_QUOTE,
                    124:        HTML_RENDER,
                    125:        HTML_REMOVED,
                    126:        HTML_S,
                    127:        HTML_SAMP,
                    128:        HTML_SELECT,
                    129:        HTML_STRONG,
                    130:        HTML_SUB,
                    131:        HTML_SUP,
                    132:        HTML_TAB,
                    133:        HTML_TABLE,
                    134:        HTML_TD,
                    135:        HTML_TEXTAREA,
                    136:        HTML_TH,
                    137:        HTML_TITLE,
                    138:        HTML_TR,
                    139:        HTML_TT,
                    140:        HTML_U,
                    141:        HTML_UL,
                    142:        HTML_VAR,
2.25      frystyk   143:        HTML_XMP
                    144: }
2.1       timbl     145: HTMLElement;
                    146: 
2.27    ! frystyk   147: #define HTMLP_ELEMENTS 89
2.1       timbl     148: 
2.6       timbl     149: </PRE><H2>Attribute numbers</H2>Identifier is
                    150: HTML_&lt;element>_&lt;attribute>. These must match the tables in <A
                    151: HREF="HTMLPDTD.c" NAME="z2">HTMLPDTD.c</A> ! <PRE>
                    152: #define HTML_A_EFFECT          0
2.1       timbl     153: #define HTML_A_HREF            1
                    154: #define HTML_A_ID              2
                    155: #define HTML_A_METHODS         3
                    156: #define HTML_A_NAME            4
                    157: #define HTML_A_PRINT           5
                    158: #define HTML_A_REL             6
                    159: #define HTML_A_REV             7
                    160: #define HTML_A_SHAPE           8       
                    161: #define HTML_A_TITLE           9
                    162: #define HTML_A_ATTRIBUTES      10
                    163: 
2.22      frystyk   164: #define HTML_BASE_HREF         0
2.1       timbl     165: #define HTML_BASE_ATTRIBUTES   1
2.11      frystyk   166: 
2.27    ! frystyk   167: #define HTML_BODY_BACKGROUND    0
        !           168: #define HTML_BODY_ATTRIBUTES    1
        !           169: 
2.11      frystyk   170: #define HTML_FORM_ACTION       0       /* WSM bug fix, added these five */
                    171: #define HTML_FORM_ID           1
                    172: #define HTML_FORM_INDEX                2
                    173: #define HTML_FORM_LANG         3
                    174: #define HTML_FORM_METHOD       4
2.1       timbl     175: #define HTML_FORM_ATTRIBUTES   5
                    176: 
2.27    ! frystyk   177: #define HTML_FRAME_SRC          0
        !           178: #define HTML_FRAME_ATTRIBUTES   1
        !           179: 
        !           180: #define HTML_FRAMESET_COLS              0
        !           181: #define HTML_FRAMESET_ROWS              1
        !           182: #define HTML_FRAMESET_BORDER            2
        !           183: #define HTML_FRAMESET_BORDERCOLOR       3
        !           184: #define HTML_FRAMESET_FRAMEBORDER       4
        !           185: #define HTML_FRAMESET_ONBLUR            5
        !           186: #define HTML_FRAMESET_ONFOCUS           6
        !           187: #define HTML_FRAMESET_ONLOAD            7
        !           188: #define HTML_FRAMESET_ONUNLOAD          8
        !           189: #define HTML_FRAMESET_ATTRIBUTES        9
        !           190: 
2.1       timbl     191: #define HTML_FIG_ATTRIBUTES    6
                    192: 
                    193: #define HTML_GEN_ATTRIBUTES    3
                    194: 
                    195: #define HTML_HTMLPLUS_ATTRIBUTES       2
                    196: 
                    197: #define HTML_IMAGE_ATTRIBUTES  5
                    198: 
                    199: #define HTML_CHANGED_ATTRIBUTES        2
2.3       frystyk   200: #define HTML_DL_ATTRIBUTES     3
2.1       timbl     201: 
                    202: #define DL_COMPACT 0
                    203: 
                    204: #define HTML_IMG_ALIGN         0
                    205: #define HTML_IMG_ALT           1
                    206: #define HTML_IMG_ISMAP         2       /* Obsolete but supported */
2.27    ! frystyk   207: #define HTML_IMG_LOWSRC                3
        !           208: #define HTML_IMG_SEETHRU       4
        !           209: #define HTML_IMG_SRC           5
        !           210: #define HTML_IMG_ATTRIBUTES    6
2.1       timbl     211: 
2.2       timbl     212: #define HTML_INPUT_ALIGN       0
                    213: #define HTML_INPUT_CHECKED     1
                    214: #define HTML_INPUT_DISABLED    2
                    215: #define HTML_INPUT_ERROR       3
                    216: #define HTML_INPUT_MAX         4
                    217: #define HTML_INPUT_MIN         5
                    218: #define HTML_INPUT_NAME                6
                    219: #define HTML_INPUT_SIZE                7
                    220: #define HTML_INPUT_SRC         8
                    221: #define HTML_INPUT_TYPE                9
                    222: #define HTML_INPUT_VALUE       10
                    223: #define HTML_INPUT_ATTRIBUTES  11
2.1       timbl     224: 
                    225: #define HTML_L_ATTRIBUTES      4
                    226: 
                    227: #define HTML_LI_ATTRIBUTES     4
2.24      frystyk   228: 
2.1       timbl     229: #define HTML_LIST_ATTRIBUTES   4
                    230: 
2.24      frystyk   231: #define HTML_LINK_CHARSET      0
                    232: #define HTML_LINK_HREF         1
                    233: #define HTML_LINK_HREFLANG     2
                    234: #define HTML_LINK_MEDIA                3
                    235: #define HTML_LINK_REL          4
                    236: #define HTML_LINK_REV          5
                    237: #define HTML_LINK_TYPE                 6
                    238: #define HTML_LINK_ATTRIBUTES   7
2.1       timbl     239: 
                    240: #define HTML_ID_ATTRIBUTE      1
                    241: 
2.25      frystyk   242: #define HTML_META_CONTENT      0
                    243: #define HTML_META_HTTP_EQUIV   1
                    244: #define HTML_META_NAME         2
                    245: #define HTML_META_SCHEME       3
                    246: #define HTML_META_ATTRIBUTES   4
                    247: 
2.1       timbl     248: #define HTML_NEXTID_ATTRIBUTES  1
                    249: #define HTML_NEXTID_N 0
                    250: 
                    251: #define HTML_NOTE_ATTRIBUTES   4
                    252: 
2.11      frystyk   253: #define HTML_OPTION_DISABLED   0       /* WSM bug fix, added these 4 */
                    254: #define HTML_OPTION_LANG       1
                    255: #define HTML_OPTION_SELECTED   2
                    256: #define HTML_OPTION_ATTRIBUTES  3
2.1       timbl     257: 
                    258: /* #define HTML_PRE_WIDTH              0
                    259:   #define HTML_PRE_ATTRIBUTES  1
                    260: */
                    261: #define HTML_RENDER_ATTRIBUTES         2
                    262: 
2.11      frystyk   263: #define HTML_SELECT_ERROR      0       /* WSM bug fix, added these 5 */
                    264: #define HTML_SELECT_LANG       1
                    265: #define HTML_SELECT_MULTIPLE   2
                    266: #define HTML_SELECT_NAME       3
                    267: #define HTML_SELECT_SIZE       4
                    268: #define HTML_SELECT_ATTRIBUTES  5
                    269: 
2.1       timbl     270: #define HTML_TAB_ATTRIBUTES    2
                    271: #define HTML_TABLE_ATTRIBUTES  4
                    272: #define HTML_TD_ATTRIBUTES     4
                    273: 
2.11      frystyk   274: #define HTML_TEXTAREA_COLS     0
                    275: #define HTML_TEXTAREA_DISABLED 1
                    276: #define HTML_TEXTAREA_ERROR    2
                    277: #define HTML_TEXTAREA_LANG     3
                    278: #define HTML_TEXTAREA_NAME     4
                    279: #define HTML_TEXTAREA_ROWS     5
2.1       timbl     280: #define HTML_TEXTAREA_ATTRIBUTES       6
                    281: 
                    282: #define HTML_TH_ATTRIBUTES     4
                    283: 
                    284: #define HTML_UL_ATTRIBUTES     6
                    285: 
2.18      frystyk   286: extern const SGML_dtd HTMLP_dtd;
2.1       timbl     287: 
                    288: 
2.6       timbl     289: </PRE><H2>Start anchor element</H2>It is kinda convenient to have a particular
                    290: routine for starting an anchor element,
                    291: as everything else for HTML is simple anyway. <H3>On entry</H3>targetstream
                    292: poinst to a structured stream object.<P>name and href point to attribute
                    293: strings or are NULL if the attribute is to be omitted. <PRE>
2.17      frystyk   294: extern void HTStartAnchor (
2.1       timbl     295:                HTStructured * targetstream,
2.18      frystyk   296:                const char *    name,
                    297:                const char *    href);
2.1       timbl     298: 
2.6       timbl     299: 
                    300: </PRE><H2>Put image element</H2>Hopefully as useful as HTStartAnchor. <H3>
                    301: On entry</H3>targetstream point to a structured stream object.<P>src,
                    302: alt and align are omitted if they are set to NULL. <PRE>
2.17      frystyk   303: extern void HTMLPutImg (HTStructured *obj,
2.18      frystyk   304:                               const char *src,
                    305:                               const char *alt,
                    306:                               const char *align);
2.1       timbl     307: 
2.6       timbl     308: </PRE><H2>Specify next ID to be used</H2>This is another convenience routine,
                    309: for specifying the next ID to be used by an editor in the series z1. z2,...
                    310: <PRE>
2.17      frystyk   311: extern void HTNextID (HTStructured * targetStream,
2.18      frystyk   312:                        const char * s);
2.1       timbl     313: 
                    314: #endif /* HTMLDTD_H */
                    315: 
2.20      frystyk   316: </PRE>
                    317: 
                    318: <HR>
                    319: <ADDRESS>
2.27    ! frystyk   320: @(#) $Id: HTMLPDTD.html,v 2.26 1998/05/14 02:10:43 frystyk Exp $
2.20      frystyk   321: </ADDRESS>
                    322: </BODY>
                    323: </HTML>

Webmaster