1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/expat/lib/xmlrole.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,114 @@ 1.4 +/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 1.5 + See the file COPYING for copying permission. 1.6 +*/ 1.7 + 1.8 +#ifndef XmlRole_INCLUDED 1.9 +#define XmlRole_INCLUDED 1 1.10 + 1.11 +#ifdef __VMS 1.12 +/* 0 1 2 3 0 1 2 3 1.13 + 1234567890123456789012345678901 1234567890123456789012345678901 */ 1.14 +#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt 1.15 +#endif 1.16 + 1.17 +#include "xmltok.h" 1.18 + 1.19 +#ifdef __cplusplus 1.20 +extern "C" { 1.21 +#endif 1.22 + 1.23 +enum { 1.24 + XML_ROLE_ERROR = -1, 1.25 + XML_ROLE_NONE = 0, 1.26 + XML_ROLE_XML_DECL, 1.27 + XML_ROLE_INSTANCE_START, 1.28 + XML_ROLE_DOCTYPE_NONE, 1.29 + XML_ROLE_DOCTYPE_NAME, 1.30 + XML_ROLE_DOCTYPE_SYSTEM_ID, 1.31 + XML_ROLE_DOCTYPE_PUBLIC_ID, 1.32 + XML_ROLE_DOCTYPE_INTERNAL_SUBSET, 1.33 + XML_ROLE_DOCTYPE_CLOSE, 1.34 + XML_ROLE_GENERAL_ENTITY_NAME, 1.35 + XML_ROLE_PARAM_ENTITY_NAME, 1.36 + XML_ROLE_ENTITY_NONE, 1.37 + XML_ROLE_ENTITY_VALUE, 1.38 + XML_ROLE_ENTITY_SYSTEM_ID, 1.39 + XML_ROLE_ENTITY_PUBLIC_ID, 1.40 + XML_ROLE_ENTITY_COMPLETE, 1.41 + XML_ROLE_ENTITY_NOTATION_NAME, 1.42 + XML_ROLE_NOTATION_NONE, 1.43 + XML_ROLE_NOTATION_NAME, 1.44 + XML_ROLE_NOTATION_SYSTEM_ID, 1.45 + XML_ROLE_NOTATION_NO_SYSTEM_ID, 1.46 + XML_ROLE_NOTATION_PUBLIC_ID, 1.47 + XML_ROLE_ATTRIBUTE_NAME, 1.48 + XML_ROLE_ATTRIBUTE_TYPE_CDATA, 1.49 + XML_ROLE_ATTRIBUTE_TYPE_ID, 1.50 + XML_ROLE_ATTRIBUTE_TYPE_IDREF, 1.51 + XML_ROLE_ATTRIBUTE_TYPE_IDREFS, 1.52 + XML_ROLE_ATTRIBUTE_TYPE_ENTITY, 1.53 + XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, 1.54 + XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, 1.55 + XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, 1.56 + XML_ROLE_ATTRIBUTE_ENUM_VALUE, 1.57 + XML_ROLE_ATTRIBUTE_NOTATION_VALUE, 1.58 + XML_ROLE_ATTLIST_NONE, 1.59 + XML_ROLE_ATTLIST_ELEMENT_NAME, 1.60 + XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, 1.61 + XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, 1.62 + XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, 1.63 + XML_ROLE_FIXED_ATTRIBUTE_VALUE, 1.64 + XML_ROLE_ELEMENT_NONE, 1.65 + XML_ROLE_ELEMENT_NAME, 1.66 + XML_ROLE_CONTENT_ANY, 1.67 + XML_ROLE_CONTENT_EMPTY, 1.68 + XML_ROLE_CONTENT_PCDATA, 1.69 + XML_ROLE_GROUP_OPEN, 1.70 + XML_ROLE_GROUP_CLOSE, 1.71 + XML_ROLE_GROUP_CLOSE_REP, 1.72 + XML_ROLE_GROUP_CLOSE_OPT, 1.73 + XML_ROLE_GROUP_CLOSE_PLUS, 1.74 + XML_ROLE_GROUP_CHOICE, 1.75 + XML_ROLE_GROUP_SEQUENCE, 1.76 + XML_ROLE_CONTENT_ELEMENT, 1.77 + XML_ROLE_CONTENT_ELEMENT_REP, 1.78 + XML_ROLE_CONTENT_ELEMENT_OPT, 1.79 + XML_ROLE_CONTENT_ELEMENT_PLUS, 1.80 + XML_ROLE_PI, 1.81 + XML_ROLE_COMMENT, 1.82 +#ifdef XML_DTD 1.83 + XML_ROLE_TEXT_DECL, 1.84 + XML_ROLE_IGNORE_SECT, 1.85 + XML_ROLE_INNER_PARAM_ENTITY_REF, 1.86 +#endif /* XML_DTD */ 1.87 + XML_ROLE_PARAM_ENTITY_REF 1.88 +}; 1.89 + 1.90 +typedef struct prolog_state { 1.91 + int (PTRCALL *handler) (struct prolog_state *state, 1.92 + int tok, 1.93 + const char *ptr, 1.94 + const char *end, 1.95 + const ENCODING *enc); 1.96 + unsigned level; 1.97 + int role_none; 1.98 +#ifdef XML_DTD 1.99 + unsigned includeLevel; 1.100 + int documentEntity; 1.101 + int inEntityValue; 1.102 +#endif /* XML_DTD */ 1.103 +} PROLOG_STATE; 1.104 + 1.105 +void XmlPrologStateInit(PROLOG_STATE *); 1.106 +#ifdef XML_DTD 1.107 +void XmlPrologStateInitExternalEntity(PROLOG_STATE *); 1.108 +#endif /* XML_DTD */ 1.109 + 1.110 +#define XmlTokenRole(state, tok, ptr, end, enc) \ 1.111 + (((state)->handler)(state, tok, ptr, end, enc)) 1.112 + 1.113 +#ifdef __cplusplus 1.114 +} 1.115 +#endif 1.116 + 1.117 +#endif /* not XmlRole_INCLUDED */