home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / xml / expat / xmltok / xmlrole.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  101 lines

  1. /*
  2. The contents of this file are subject to the Mozilla Public License
  3. Version 1.0 (the "License"); you may not use this file except in
  4. compliance with the License. You may obtain a copy of the License at
  5. http://www.mozilla.org/MPL/
  6.  
  7. Software distributed under the License is distributed on an "AS IS"
  8. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  9. License for the specific language governing rights and limitations
  10. under the License.
  11.  
  12. The Original Code is expat.
  13.  
  14. The Initial Developer of the Original Code is James Clark.
  15. Portions created by James Clark are Copyright (C) 1998
  16. James Clark. All Rights Reserved.
  17.  
  18. Contributor(s):
  19. */
  20.  
  21. #ifndef XmlRole_INCLUDED
  22. #define XmlRole_INCLUDED 1
  23.  
  24. #include "xmltok.h"
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. enum {
  31.   XML_ROLE_ERROR = -1,
  32.   XML_ROLE_NONE = 0,
  33.   XML_ROLE_XML_DECL,
  34.   XML_ROLE_INSTANCE_START,
  35.   XML_ROLE_DOCTYPE_NAME,
  36.   XML_ROLE_DOCTYPE_SYSTEM_ID,
  37.   XML_ROLE_DOCTYPE_PUBLIC_ID,
  38.   XML_ROLE_DOCTYPE_CLOSE,
  39.   XML_ROLE_GENERAL_ENTITY_NAME,
  40.   XML_ROLE_PARAM_ENTITY_NAME,
  41.   XML_ROLE_ENTITY_VALUE,
  42.   XML_ROLE_ENTITY_SYSTEM_ID,
  43.   XML_ROLE_ENTITY_PUBLIC_ID,
  44.   XML_ROLE_ENTITY_NOTATION_NAME,
  45.   XML_ROLE_NOTATION_NAME,
  46.   XML_ROLE_NOTATION_SYSTEM_ID,
  47.   XML_ROLE_NOTATION_PUBLIC_ID,
  48.   XML_ROLE_ATTRIBUTE_NAME,
  49.   XML_ROLE_ATTRIBUTE_TYPE_CDATA,
  50.   XML_ROLE_ATTRIBUTE_TYPE_ID,
  51.   XML_ROLE_ATTRIBUTE_TYPE_IDREF,
  52.   XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
  53.   XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
  54.   XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
  55.   XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
  56.   XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
  57.   XML_ROLE_ATTRIBUTE_ENUM_VALUE,
  58.   XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
  59.   XML_ROLE_ATTLIST_ELEMENT_NAME,
  60.   XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
  61.   XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
  62.   XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
  63.   XML_ROLE_FIXED_ATTRIBUTE_VALUE,
  64.   XML_ROLE_ELEMENT_NAME,
  65.   XML_ROLE_CONTENT_ANY,
  66.   XML_ROLE_CONTENT_EMPTY,
  67.   XML_ROLE_CONTENT_PCDATA,
  68.   XML_ROLE_GROUP_OPEN,
  69.   XML_ROLE_GROUP_CLOSE,
  70.   XML_ROLE_GROUP_CLOSE_REP,
  71.   XML_ROLE_GROUP_CLOSE_OPT,
  72.   XML_ROLE_GROUP_CLOSE_PLUS,
  73.   XML_ROLE_GROUP_CHOICE,
  74.   XML_ROLE_GROUP_SEQUENCE,
  75.   XML_ROLE_CONTENT_ELEMENT,
  76.   XML_ROLE_CONTENT_ELEMENT_REP,
  77.   XML_ROLE_CONTENT_ELEMENT_OPT,
  78.   XML_ROLE_CONTENT_ELEMENT_PLUS,
  79.   XML_ROLE_PARAM_ENTITY_REF
  80. };
  81.  
  82. typedef struct prolog_state {
  83.   int (*handler)(struct prolog_state *state,
  84.              int tok,
  85.          const char *ptr,
  86.          const char *end,
  87.          const ENCODING *enc);
  88.   unsigned level;
  89. } PROLOG_STATE;
  90.  
  91. void XMLTOKAPI XmlPrologStateInit(PROLOG_STATE *);
  92.  
  93. #define XmlTokenRole(state, tok, ptr, end, enc) \
  94.  (((state)->handler)(state, tok, ptr, end, enc))
  95.  
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99.  
  100. #endif /* not XmlRole_INCLUDED */
  101.