home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / WWW / Library / Implementation / HTMLDTD.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  3.9 KB  |  153 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. #ifndef HTUTILS_H
  15. #include "HTUtils.h"
  16. #endif /* HTUTILS_H */
  17. #include "SGML.h"
  18.  
  19. /*
  20.  
  21. Element Numbers
  22.  
  23.  */
  24.  
  25. /*
  26.  
  27.    Must Match all tables by element! These include tables in HTMLDTD.c and code in HTML.c
  28.    .
  29.    
  30.  */
  31. typedef enum _HTMLElement {
  32.         HTML_A,         HTML_ADDRESS,
  33.         HTML_B,         HTML_BASE,      HTML_BLOCKQUOTE,
  34.     HTML_BODY,      HTML_BR,
  35.         HTML_CITE,      HTML_CODE,      HTML_COMMENT,
  36.         HTML_DD,        HTML_DFN,       HTML_DIR,
  37.         HTML_DL,        HTML_DLC,       HTML_DT,
  38.         HTML_EM,     HTML_FORM,
  39.         HTML_H1,        HTML_H2,        HTML_H3,
  40.         HTML_H4,        HTML_H5,        HTML_H6,        HTML_H7,
  41.         HTML_HEAD,      HTML_HR,        HTML_HTML,
  42.         HTML_I,         HTML_IMG,    HTML_INPUT,     HTML_ISINDEX,
  43.         HTML_KBD,
  44.         HTML_LI,        HTML_LINK,      HTML_LISTING,
  45.         HTML_MENU,    HTML_MH,    HTML_NEXTID,    
  46.         HTML_OL,        HTML_OPTION,    HTML_P,         
  47.     HTML_PLAINTEXT, HTML_PRE,
  48.         HTML_SAMP,      HTML_SELECT,    HTML_STRONG,    HTML_TEXTAREA,
  49.         HTML_TITLE,     HTML_TT,
  50.         HTML_U,         HTML_UL,
  51.         HTML_VAR,       HTML_XMP } HTMLElement;
  52.  
  53. #define HTML_ELEMENTS 54
  54.  
  55. /*
  56.  
  57. Attribute numbers
  58.  
  59.  */
  60.  
  61. /*
  62.  
  63.    Identifier is HTML_<element>_<attribute>. These must match the tables in HTML.c!
  64.    
  65.  */
  66. #define HTML_A_HREF             0
  67. #define HTML_A_NAME             1
  68. #define HTML_A_TITLE            2
  69. #define HTML_A_TYPE             3
  70. #define HTML_A_URN              4
  71. #define HTML_A_ATTRIBUTES       5
  72.  
  73. #define HTML_BASE_HREF          0
  74. #define HTML_BASE_ATTRIBUTES    1
  75.  
  76. #define DL_COMPACT 0
  77.  
  78. #define HTML_IMG_ALT        0
  79. #define HTML_IMG_ISMAP        1
  80. #define HTML_IMG_SRC            2
  81. #define HTML_IMG_ATTRIBUTES     3
  82.  
  83. #define HTML_ISINDEX_ACTION     0  /* Treat as synonym for HREF. - FM */
  84. #define HTML_ISINDEX_HREF       1  /* HTML 3.0 "action". - FM */
  85. #define HTML_ISINDEX_PROMPT     2  /* HTML 3.0 "prompt". - FM */
  86. #define HTML_ISINDEX_ATTRIBUTES 3
  87.  
  88. #define HTML_LINK_HREF          0
  89. #define HTML_LINK_REL           1
  90. #define HTML_LINK_REV           2
  91. #define HTML_LINK_ATTRIBUTES    3
  92.  
  93. #define HTML_FORM_ACTION    0
  94. #define HTML_FORM_ENCTYPE    1
  95. #define HTML_FORM_METHOD    2
  96. #define HTML_FORM_ATTRIBUTES    3
  97.  
  98. #define HTML_SELECT_MULTIPLE    0
  99. #define HTML_SELECT_NAME    1
  100. #define HTML_SELECT_SIZE    2
  101. #define HTML_SELECT_ATTRIBUTES    3
  102.  
  103. #define HTML_OPTION_SELECTED    0
  104. #define HTML_OPTION_VALUE       1
  105. #define HTML_OPTION_ATTRIBUTES    2
  106.  
  107. #define HTML_TEXTAREA_COLS    0
  108. #define HTML_TEXTAREA_NAME    1
  109. #define HTML_TEXTAREA_ROWS    2
  110. #define HTML_TEXTAREA_ATTRIBUTES 3
  111.  
  112. #define HTML_INPUT_CHECKED    0
  113. #define HTML_INPUT_MAXLENGTH    1
  114. #define HTML_INPUT_NAME        2
  115. #define HTML_INPUT_SIZE        3
  116. #define HTML_INPUT_TYPE        4
  117. #define HTML_INPUT_VALUE    5
  118. #define HTML_INPUT_ATTRIBUTES    6
  119.  
  120. #define HTML_MH_HIDDEN    0
  121. #define HTML_MH_ATTRIBUTES    1
  122.  
  123. #define NEXTID_N 0
  124.  
  125. extern CONST SGML_dtd HTML_dtd;
  126.  
  127.  
  128. /*
  129.  
  130. Start anchor element
  131.  
  132.    It is kinda convenient to have a particulr routine for starting an anchor element, as
  133.    everything else for HTML is simple anyway.
  134.    
  135.   ON ENTRY
  136.   
  137.    targetstream poinst to a structured stream object.
  138.    
  139.    name and href point to attribute strings or are NULL if the attribute is to be omitted.
  140.    
  141.  */
  142. extern void HTStartAnchor PARAMS((
  143.                 HTStructured * targetstream,
  144.                 CONST char *    name,
  145.                 CONST char *    href));
  146.  
  147.  
  148. #endif /* HTMLDTD_H */
  149.  
  150. /*
  151.  
  152.    End of module definition  */
  153.