xml/expat/lib/xmlrole.h

00001 /*
00002 Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
00003 See the file COPYING for copying permission.
00004 */
00005 
00006 #ifndef XmlRole_INCLUDED
00007 #define XmlRole_INCLUDED 1
00008 
00009 #include "xmltok.h"
00010 
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014 
00015 enum {
00016   XML_ROLE_ERROR = -1,
00017   XML_ROLE_NONE = 0,
00018   XML_ROLE_XML_DECL,
00019   XML_ROLE_INSTANCE_START,
00020   XML_ROLE_DOCTYPE_NAME,
00021   XML_ROLE_DOCTYPE_SYSTEM_ID,
00022   XML_ROLE_DOCTYPE_PUBLIC_ID,
00023   XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
00024   XML_ROLE_DOCTYPE_CLOSE,
00025   XML_ROLE_GENERAL_ENTITY_NAME,
00026   XML_ROLE_PARAM_ENTITY_NAME,
00027   XML_ROLE_ENTITY_VALUE,
00028   XML_ROLE_ENTITY_SYSTEM_ID,
00029   XML_ROLE_ENTITY_PUBLIC_ID,
00030   XML_ROLE_ENTITY_COMPLETE,
00031   XML_ROLE_ENTITY_NOTATION_NAME,
00032   XML_ROLE_NOTATION_NAME,
00033   XML_ROLE_NOTATION_SYSTEM_ID,
00034   XML_ROLE_NOTATION_NO_SYSTEM_ID,
00035   XML_ROLE_NOTATION_PUBLIC_ID,
00036   XML_ROLE_ATTRIBUTE_NAME,
00037   XML_ROLE_ATTRIBUTE_TYPE_CDATA,
00038   XML_ROLE_ATTRIBUTE_TYPE_ID,
00039   XML_ROLE_ATTRIBUTE_TYPE_IDREF,
00040   XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
00041   XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
00042   XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
00043   XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
00044   XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
00045   XML_ROLE_ATTRIBUTE_ENUM_VALUE,
00046   XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
00047   XML_ROLE_ATTLIST_ELEMENT_NAME,
00048   XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
00049   XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
00050   XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
00051   XML_ROLE_FIXED_ATTRIBUTE_VALUE,
00052   XML_ROLE_ELEMENT_NAME,
00053   XML_ROLE_CONTENT_ANY,
00054   XML_ROLE_CONTENT_EMPTY,
00055   XML_ROLE_CONTENT_PCDATA,
00056   XML_ROLE_GROUP_OPEN,
00057   XML_ROLE_GROUP_CLOSE,
00058   XML_ROLE_GROUP_CLOSE_REP,
00059   XML_ROLE_GROUP_CLOSE_OPT,
00060   XML_ROLE_GROUP_CLOSE_PLUS,
00061   XML_ROLE_GROUP_CHOICE,
00062   XML_ROLE_GROUP_SEQUENCE,
00063   XML_ROLE_CONTENT_ELEMENT,
00064   XML_ROLE_CONTENT_ELEMENT_REP,
00065   XML_ROLE_CONTENT_ELEMENT_OPT,
00066   XML_ROLE_CONTENT_ELEMENT_PLUS,
00067 #ifdef XML_DTD
00068   XML_ROLE_TEXT_DECL,
00069   XML_ROLE_IGNORE_SECT,
00070   XML_ROLE_INNER_PARAM_ENTITY_REF,
00071 #endif /* XML_DTD */
00072   XML_ROLE_PARAM_ENTITY_REF
00073 };
00074 
00075 typedef struct prolog_state {
00076   int (*handler)(struct prolog_state *state,
00077                  int tok,
00078                  const char *ptr,
00079                  const char *end,
00080                  const ENCODING *enc);
00081   unsigned level;
00082 #ifdef XML_DTD
00083   unsigned includeLevel;
00084   int documentEntity;
00085 #endif /* XML_DTD */
00086 } PROLOG_STATE;
00087 
00088 void XmlPrologStateInit(PROLOG_STATE *);
00089 #ifdef XML_DTD
00090 void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
00091 #endif /* XML_DTD */
00092 
00093 #define XmlTokenRole(state, tok, ptr, end, enc) \
00094  (((state)->handler)(state, tok, ptr, end, enc))
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif /* not XmlRole_INCLUDED */

Generated on Tue Sep 11 08:13:14 2007 for Apache Portable Runtime Utility Library by  doxygen 1.5.2