Addons updated to new doc format
[io.git] / addons / SGML / source / IoSGMLParser.h
blobce03cbfc14d5be295d2494519d2bdd6b2d7ea392
1 /*
2 //metadoc copyright Steve Dekorte 2002
3 */
4 //metadoc license BSD revised
5 */
7 #ifndef IOSGMLPARSER_DEFINED
8 #define IOSGMLPARSER_DEFINED 1
10 #include "IoSeq.h"
11 #include <sgml/libsgml.h>
13 typedef IoObject IoSGMLParser;
15 typedef struct
17 int isInitialized;
18 SGML_PARSER parser;
19 SGML_HANDLERS handlers;
20 char *tmpString;
22 IoMessage *startElementMessage;
23 IoMessage *endElementMessage;
24 IoMessage *newAttributeMessage;
25 IoMessage *newTextMessage;
27 } IoSGMLParserData;
29 IoSGMLParser *IoSGMLParser_proto(void *state);
30 void IoSGMLParser_free(IoSGMLParser *self);
31 IoSGMLParser *IoSGMLParser_rawClone(IoSGMLParser *self);
32 void IoSGMLParser_mark(IoSGMLParser *self);
33 void IoSGMLParser_free(IoSGMLParser *self);
35 /* --- callbacks ---------------------------------- */
37 void IoSGMLParser_startElementHandler(SGML_PARSER *parser,
38 void *userContext,
39 const char *elementName);
41 void IoSGMLParser_endElementHandler(SGML_PARSER *parser,
42 void *userContext,
43 const char *elementName);
45 void IoSGMLParser_newAttributeHandler(SGML_PARSER *parser,
46 void *userContext,
47 const char *attributeName,
48 const char *attributeValue);
50 void IoSGMLParser_characterDataHandler(SGML_PARSER *parser,
51 void *userContext,
52 const char *text);
54 /* ------------------------------------------------ */
56 IoObject *IoSGMLParser_parse(IoObject *self, IoObject *locals, IoMessage *m);
58 #endif