home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / www / library / implemen / htmldtd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  3.8 KB  |  193 lines

  1. /*                                               The HTML DTD -- software interface in libwww
  2.                               HTML DTD - SOFTWARE INTERFACE
  3.                                              
  4.    SGML purists should excuse the use of the term "DTD" in this file to represent
  5.    DTD-related information which is not exactly a DTD itself.
  6.    
  7.    The C modular structure doesn't work very well here, as the dtd is partly in the .h and
  8.    partly in the .c which are not very independent.  Tant pis.
  9.    
  10.  */
  11. #ifndef HTMLDTD_H
  12. #define HTMLDTD_H
  13.  
  14. #include "HTUtils.h"
  15. #include "SGML.h"
  16.  
  17. /*
  18.  
  19. Element Numbers
  20.  
  21.  */
  22.  
  23. /*
  24.  
  25.    Must Match all tables by element! These include tables in HTMLDTD.c and code in HTML.c
  26.    .
  27.    
  28.  */
  29. typedef enum _HTMLElement {
  30.     HTML_A,
  31.     HTML_ADDRESS,
  32.     HTML_B,
  33.     HTML_BLOCKQUOTE,
  34.     HTML_BODY,
  35.     HTML_BR,
  36.     HTML_CITE,
  37.     HTML_CODE,
  38.     HTML_COMMENT,
  39.     HTML_DD,
  40.     HTML_DFN,
  41.     HTML_DIR,
  42.     HTML_DL,
  43.     HTML_DLC,
  44.     HTML_DT,
  45.     HTML_EM,
  46.     HTML_FORM,
  47.     HTML_H1,
  48.     HTML_H2,
  49.     HTML_H3,
  50.     HTML_H4,
  51.     HTML_H5,
  52.     HTML_H6,
  53.     HTML_H7,
  54.     HTML_HEAD,
  55.     HTML_HR,
  56.     HTML_HTML,
  57.     HTML_I,
  58.     HTML_IMG,
  59.     HTML_INPUT,
  60.     HTML_ISINDEX,
  61.     HTML_KBD,
  62.     HTML_LI,
  63.     HTML_LINK,
  64.     HTML_LISTING,
  65.     HTML_MENU,
  66.     HTML_NEXTID,
  67.     HTML_OL,
  68.     HTML_OPTION,
  69.     HTML_P,
  70.     HTML_PLAINTEXT,
  71.     HTML_PRE,
  72.     HTML_SAMP,
  73.     HTML_SELECT,
  74.     HTML_STRONG,
  75.     HTML_TEXTAREA,
  76.     HTML_TITLE,
  77.     HTML_TT,
  78.     HTML_U,
  79.     HTML_UL,
  80.     HTML_VAR,
  81.     HTML_XMP
  82. }
  83. HTMLElement;
  84.  
  85. #define HTML_ELEMENTS 52
  86.  
  87. /*
  88.  
  89. Attribute numbers
  90.  
  91.  */
  92.  
  93. /*
  94.  
  95.    Identifier is HTML_<element>_<attribute>. These must match the tables in HTMLDTD.c !
  96.  
  97.  */
  98. #define HTML_A_HREF             0
  99. #define HTML_A_NAME             1
  100. #define HTML_A_REL              2
  101. #define HTML_A_REV              3
  102. #define HTML_A_TITLE            4
  103. #define HTML_A_TYPE             5
  104. #define HTML_A_URN              6
  105. #define HTML_A_ATTRIBUTES       7
  106.  
  107. #define DL_COMPACT 0
  108.  
  109. #define HTML_IMG_ALIGN          0
  110.  
  111. #define HTML_IMG_ALT            1
  112. #define HTML_IMG_ISMAP          2       /* Obsolete but supported */
  113. #define HTML_IMG_SRC            3
  114. #define HTML_IMG_ATTRIBUTES     4
  115.  
  116. #define HTML_ISINDEX_ACTION     0
  117. #define HTML_ISINDEX_ATTRIBUTES 1
  118.  
  119. #define HTML_NEXTID_ATTRIBUTES  1
  120. #define HTML_NEXTID_N 0
  121.  
  122. #define HTML_PRE_WIDTH          0
  123. #define HTML_PRE_ATTRIBUTES     1
  124.  
  125. /*
  126.  *    Forms stuff.
  127.  */
  128. #define HTML_FORM_ACTION    0
  129. #define HTML_FORM_ENCTYPE    1
  130. #define HTML_FORM_METHOD    2
  131. #define HTML_FORM_ATTRIBUTES    3
  132.  
  133. #define HTML_SELECT_MULTIPLE    0
  134. #define HTML_SELECT_NAME    1
  135. #define HTML_SELECT_ATTRIBUTES    2
  136.  
  137. #define HTML_OPTION_SELECTED    0
  138. #define HTML_OPTION_VALUE    1
  139. #define HTML_OPTION_ATTRIBUTES    2
  140.  
  141. #define HTML_TEXTAREA_COLS        0
  142. #define HTML_TEXTAREA_NAME        1
  143. #define HTML_TEXTAREA_ROWS        2
  144. #define HTML_TEXTAREA_ATTRIBUTES    3
  145.  
  146. #define HTML_INPUT_CHECKED    0
  147. #define HTML_INPUT_MAXLENGTH    1
  148. #define HTML_INPUT_NAME        2
  149. #define HTML_INPUT_SIZE        3
  150. #define HTML_INPUT_TYPE        4
  151. #define HTML_INPUT_VALUE    5
  152. #define HTML_INPUT_ATTRIBUTES    6
  153.  
  154. extern CONST SGML_dtd HTML_dtd;
  155.  
  156.  
  157. /*
  158.  
  159. Start anchor element
  160.  
  161.    It is kinda convenient to have a particulr routine for starting an anchor element, as
  162.    everything else for HTML is simple anyway.
  163.  
  164.   ON ENTRY
  165.  
  166.    targetstream poinst to a structured stream object.
  167.  
  168.    name and href point to attribute strings or are NULL if the attribute is to be omitted.
  169.  
  170.  */
  171. extern void HTStartAnchor PARAMS((
  172.                 HTStructured * targetstream,
  173.                 CONST char *    name,
  174.                 CONST char *    href));
  175.  
  176.  
  177. #endif /* HTMLDTD_H */
  178.  
  179.  
  180. /*
  181.  
  182. Specify next ID to be used
  183.  
  184.    This is anoter convenience routine, for specifying the next ID to be used by an editor
  185.    in the series z1. z2,...
  186.    
  187.  */
  188. extern void HTNextID PARAMS((HTStructured * targetStream, int n));
  189.  
  190. /*
  191.  
  192.    End of module definition */
  193.