blob: f2b1e19db53c8d00ddec7b04758c40bf4e1134ba [file] [log] [blame]
Daniel Veillard1af9a412003-08-20 22:54:39 +00001/*
2 * SAX.h : Default SAX2 handler interfaces to build a tree.
3 *
4 * See Copyright for the status of this software.
5 *
6 * Daniel Veillard <daniel@veillard.com>
7 */
8
9
10#ifndef __XML_SAX2_H__
11#define __XML_SAX2_H__
12
13#include <stdio.h>
14#include <stdlib.h>
15#include <libxml/parser.h>
16#include <libxml/xlink.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21const xmlChar * xmlSAX2GetPublicId (void *ctx);
22const xmlChar * xmlSAX2GetSystemId (void *ctx);
23void xmlSAX2SetDocumentLocator (void *ctx,
24 xmlSAXLocatorPtr loc);
25
26int xmlSAX2GetLineNumber (void *ctx);
27int xmlSAX2GetColumnNumber (void *ctx);
28
29int xmlSAX2IsStandalone (void *ctx);
30int xmlSAX2HasInternalSubset (void *ctx);
31int xmlSAX2HasExternalSubset (void *ctx);
32
33void xmlSAX2InternalSubset (void *ctx,
34 const xmlChar *name,
35 const xmlChar *ExternalID,
36 const xmlChar *SystemID);
37void xmlSAX2ExternalSubset (void *ctx,
38 const xmlChar *name,
39 const xmlChar *ExternalID,
40 const xmlChar *SystemID);
41xmlEntityPtr xmlSAX2GetEntity (void *ctx,
42 const xmlChar *name);
43xmlEntityPtr xmlSAX2GetParameterEntity (void *ctx,
44 const xmlChar *name);
45xmlParserInputPtr xmlSAX2ResolveEntity (void *ctx,
46 const xmlChar *publicId,
47 const xmlChar *systemId);
48
49void xmlSAX2EntityDecl (void *ctx,
50 const xmlChar *name,
51 int type,
52 const xmlChar *publicId,
53 const xmlChar *systemId,
54 xmlChar *content);
55void xmlSAX2AttributeDecl (void *ctx,
56 const xmlChar *elem,
57 const xmlChar *fullname,
58 int type,
59 int def,
60 const xmlChar *defaultValue,
61 xmlEnumerationPtr tree);
62void xmlSAX2ElementDecl (void *ctx,
63 const xmlChar *name,
64 int type,
65 xmlElementContentPtr content);
66void xmlSAX2NotationDecl (void *ctx,
67 const xmlChar *name,
68 const xmlChar *publicId,
69 const xmlChar *systemId);
70void xmlSAX2UnparsedEntityDecl (void *ctx,
71 const xmlChar *name,
72 const xmlChar *publicId,
73 const xmlChar *systemId,
74 const xmlChar *notationName);
75
76void xmlSAX2StartDocument (void *ctx);
77void xmlSAX2EndDocument (void *ctx);
78void xmlSAX2StartElement (void *ctx,
79 const xmlChar *fullname,
80 const xmlChar **atts);
81void xmlSAX2EndElement (void *ctx,
82 const xmlChar *name);
83void xmlSAX2Reference (void *ctx,
84 const xmlChar *name);
85void xmlSAX2Characters (void *ctx,
86 const xmlChar *ch,
87 int len);
88void xmlSAX2IgnorableWhitespace (void *ctx,
89 const xmlChar *ch,
90 int len);
91void xmlSAX2ProcessingInstruction (void *ctx,
92 const xmlChar *target,
93 const xmlChar *data);
94void xmlSAX2GlobalNamespace (void *ctx,
95 const xmlChar *href,
96 const xmlChar *prefix);
97void xmlSAX2SetNamespace (void *ctx,
98 const xmlChar *name);
99xmlNsPtr xmlSAX2GetNamespace (void *ctx);
100int xmlSAX2CheckNamespace (void *ctx,
101 xmlChar *nameSpace);
102void xmlSAX2NamespaceDecl (void *ctx,
103 const xmlChar *href,
104 const xmlChar *prefix);
105void xmlSAX2Comment (void *ctx,
106 const xmlChar *value);
107void xmlSAX2CDataBlock (void *ctx,
108 const xmlChar *value,
109 int len);
110
111void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
112 int warning);
113#ifdef LIBXML_HTML_ENABLED
114void xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
115#endif
116#ifdef LIBXML_DOCB_ENABLED
117void xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
118#endif
119void xmlDefaultSAXHandlerInit (void);
120void htmlDefaultSAXHandlerInit (void);
121void docbDefaultSAXHandlerInit (void);
122#ifdef __cplusplus
123}
124#endif
125#endif /* __XML_SAX2_H__ */