home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _6659cda3779bb1b201de93373aa0e0a6 < prev    next >
Encoding:
Text File  |  2004-06-01  |  3.7 KB  |  126 lines

  1. /*
  2. The contents of this file are subject to the Mozilla Public License
  3. Version 1.1 (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, 1999
  16. James Clark. All Rights Reserved.
  17.  
  18. Contributor(s):
  19.  
  20. Alternatively, the contents of this file may be used under the terms
  21. of the GNU General Public License (the "GPL"), in which case the
  22. provisions of the GPL are applicable instead of those above.  If you
  23. wish to allow use of your version of this file only under the terms of
  24. the GPL and not to allow others to use your version of this file under
  25. the MPL, indicate your decision by deleting the provisions above and
  26. replace them with the notice and other provisions required by the
  27. GPL. If you do not delete the provisions above, a recipient may use
  28. your version of this file under either the MPL or the GPL.
  29. */
  30.  
  31. #ifndef XmlRole_INCLUDED
  32. #define XmlRole_INCLUDED 1
  33.  
  34. #include "xmltok.h"
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. enum {
  41.   XML_ROLE_ERROR = -1,
  42.   XML_ROLE_NONE = 0,
  43.   XML_ROLE_XML_DECL,
  44.   XML_ROLE_INSTANCE_START,
  45.   XML_ROLE_DOCTYPE_NAME,
  46.   XML_ROLE_DOCTYPE_SYSTEM_ID,
  47.   XML_ROLE_DOCTYPE_PUBLIC_ID,
  48.   XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
  49.   XML_ROLE_DOCTYPE_CLOSE,
  50.   XML_ROLE_GENERAL_ENTITY_NAME,
  51.   XML_ROLE_PARAM_ENTITY_NAME,
  52.   XML_ROLE_ENTITY_VALUE,
  53.   XML_ROLE_ENTITY_SYSTEM_ID,
  54.   XML_ROLE_ENTITY_PUBLIC_ID,
  55.   XML_ROLE_ENTITY_COMPLETE,
  56.   XML_ROLE_ENTITY_NOTATION_NAME,
  57.   XML_ROLE_NOTATION_NAME,
  58.   XML_ROLE_NOTATION_SYSTEM_ID,
  59.   XML_ROLE_NOTATION_NO_SYSTEM_ID,
  60.   XML_ROLE_NOTATION_PUBLIC_ID,
  61.   XML_ROLE_ATTRIBUTE_NAME,
  62.   XML_ROLE_ATTRIBUTE_TYPE_CDATA,
  63.   XML_ROLE_ATTRIBUTE_TYPE_ID,
  64.   XML_ROLE_ATTRIBUTE_TYPE_IDREF,
  65.   XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
  66.   XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
  67.   XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
  68.   XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
  69.   XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
  70.   XML_ROLE_ATTRIBUTE_ENUM_VALUE,
  71.   XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
  72.   XML_ROLE_ATTLIST_ELEMENT_NAME,
  73.   XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
  74.   XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
  75.   XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
  76.   XML_ROLE_FIXED_ATTRIBUTE_VALUE,
  77.   XML_ROLE_ELEMENT_NAME,
  78.   XML_ROLE_CONTENT_ANY,
  79.   XML_ROLE_CONTENT_EMPTY,
  80.   XML_ROLE_CONTENT_PCDATA,
  81.   XML_ROLE_GROUP_OPEN,
  82.   XML_ROLE_GROUP_CLOSE,
  83.   XML_ROLE_GROUP_CLOSE_REP,
  84.   XML_ROLE_GROUP_CLOSE_OPT,
  85.   XML_ROLE_GROUP_CLOSE_PLUS,
  86.   XML_ROLE_GROUP_CHOICE,
  87.   XML_ROLE_GROUP_SEQUENCE,
  88.   XML_ROLE_CONTENT_ELEMENT,
  89.   XML_ROLE_CONTENT_ELEMENT_REP,
  90.   XML_ROLE_CONTENT_ELEMENT_OPT,
  91.   XML_ROLE_CONTENT_ELEMENT_PLUS,
  92. #ifdef XML_DTD
  93.   XML_ROLE_TEXT_DECL,
  94.   XML_ROLE_IGNORE_SECT,
  95.   XML_ROLE_INNER_PARAM_ENTITY_REF,
  96. #endif /* XML_DTD */
  97.   XML_ROLE_PARAM_ENTITY_REF
  98. };
  99.  
  100. typedef struct prolog_state {
  101.   int (*handler)(struct prolog_state *state,
  102.              int tok,
  103.          const char *ptr,
  104.          const char *end,
  105.          const ENCODING *enc);
  106.   unsigned level;
  107. #ifdef XML_DTD
  108.   unsigned includeLevel;
  109.   int documentEntity;
  110. #endif /* XML_DTD */
  111. } PROLOG_STATE;
  112.  
  113. void XMLTOKAPI XmlPrologStateInit(PROLOG_STATE *);
  114. #ifdef XML_DTD
  115. void XMLTOKAPI XmlPrologStateInitExternalEntity(PROLOG_STATE *);
  116. #endif /* XML_DTD */
  117.  
  118. #define XmlTokenRole(state, tok, ptr, end, enc) \
  119.  (((state)->handler)(state, tok, ptr, end, enc))
  120.  
  121. #ifdef __cplusplus
  122. }
  123. #endif
  124.  
  125. #endif /* not XmlRole_INCLUDED */
  126.