source: protocols/jabber/xmlrole.h @ 7b23afd

Last change on this file since 7b23afd was b7d3cc34, checked in by Wilmer van der Gaast <wilmer@…>, at 2005-11-06T18:23:18Z

Initial repository (0.99 release tree)

  • Property mode set to 100644
File size: 3.2 KB
RevLine 
[b7d3cc34]1/*
2The contents of this file are subject to the Mozilla Public License
3Version 1.1 (the "License"); you may not use this file except in
4compliance with the License. You may obtain a copy of the License at
5http://www.mozilla.org/MPL/
6
7Software distributed under the License is distributed on an "AS IS"
8basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9License for the specific language governing rights and limitations
10under the License.
11
12The Original Code is expat.
13
14The Initial Developer of the Original Code is James Clark.
15Portions created by James Clark are Copyright (C) 1998, 1999
16James Clark. All Rights Reserved.
17
18Contributor(s):
19
20Alternatively, the contents of this file may be used under the terms
21of the GNU General Public License (the "GPL"), in which case the
22provisions of the GPL are applicable instead of those above.  If you
23wish to allow use of your version of this file only under the terms of
24the GPL and not to allow others to use your version of this file under
25the MPL, indicate your decision by deleting the provisions above and
26replace them with the notice and other provisions required by the
27GPL. If you do not delete the provisions above, a recipient may use
28your 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
37extern "C" {
38#endif
39
40enum {
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_CLOSE,
49  XML_ROLE_GENERAL_ENTITY_NAME,
50  XML_ROLE_PARAM_ENTITY_NAME,
51  XML_ROLE_ENTITY_VALUE,
52  XML_ROLE_ENTITY_SYSTEM_ID,
53  XML_ROLE_ENTITY_PUBLIC_ID,
54  XML_ROLE_ENTITY_NOTATION_NAME,
55  XML_ROLE_NOTATION_NAME,
56  XML_ROLE_NOTATION_SYSTEM_ID,
57  XML_ROLE_NOTATION_NO_SYSTEM_ID,
58  XML_ROLE_NOTATION_PUBLIC_ID,
59  XML_ROLE_ATTRIBUTE_NAME,
60  XML_ROLE_ATTRIBUTE_TYPE_CDATA,
61  XML_ROLE_ATTRIBUTE_TYPE_ID,
62  XML_ROLE_ATTRIBUTE_TYPE_IDREF,
63  XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
64  XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
65  XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
66  XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
67  XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
68  XML_ROLE_ATTRIBUTE_ENUM_VALUE,
69  XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
70  XML_ROLE_ATTLIST_ELEMENT_NAME,
71  XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
72  XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
73  XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
74  XML_ROLE_FIXED_ATTRIBUTE_VALUE,
75  XML_ROLE_ELEMENT_NAME,
76  XML_ROLE_CONTENT_ANY,
77  XML_ROLE_CONTENT_EMPTY,
78  XML_ROLE_CONTENT_PCDATA,
79  XML_ROLE_GROUP_OPEN,
80  XML_ROLE_GROUP_CLOSE,
81  XML_ROLE_GROUP_CLOSE_REP,
82  XML_ROLE_GROUP_CLOSE_OPT,
83  XML_ROLE_GROUP_CLOSE_PLUS,
84  XML_ROLE_GROUP_CHOICE,
85  XML_ROLE_GROUP_SEQUENCE,
86  XML_ROLE_CONTENT_ELEMENT,
87  XML_ROLE_CONTENT_ELEMENT_REP,
88  XML_ROLE_CONTENT_ELEMENT_OPT,
89  XML_ROLE_CONTENT_ELEMENT_PLUS,
90  XML_ROLE_PARAM_ENTITY_REF
91};
92
93typedef struct prolog_state {
94  int (*handler)(struct prolog_state *state,
95                 int tok,
96                 const char *ptr,
97                 const char *end,
98                 const ENCODING *enc);
99  unsigned level;
100} PROLOG_STATE;
101
102void XMLTOKAPI XmlPrologStateInit(PROLOG_STATE *);
103
104#define XmlTokenRole(state, tok, ptr, end, enc) \
105 (((state)->handler)(state, tok, ptr, end, enc))
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* not XmlRole_INCLUDED */
Note: See TracBrowser for help on using the repository browser.