Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame^] | 1 | /* |
| 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 |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | const xmlChar * xmlSAX2GetPublicId (void *ctx); |
| 22 | const xmlChar * xmlSAX2GetSystemId (void *ctx); |
| 23 | void xmlSAX2SetDocumentLocator (void *ctx, |
| 24 | xmlSAXLocatorPtr loc); |
| 25 | |
| 26 | int xmlSAX2GetLineNumber (void *ctx); |
| 27 | int xmlSAX2GetColumnNumber (void *ctx); |
| 28 | |
| 29 | int xmlSAX2IsStandalone (void *ctx); |
| 30 | int xmlSAX2HasInternalSubset (void *ctx); |
| 31 | int xmlSAX2HasExternalSubset (void *ctx); |
| 32 | |
| 33 | void xmlSAX2InternalSubset (void *ctx, |
| 34 | const xmlChar *name, |
| 35 | const xmlChar *ExternalID, |
| 36 | const xmlChar *SystemID); |
| 37 | void xmlSAX2ExternalSubset (void *ctx, |
| 38 | const xmlChar *name, |
| 39 | const xmlChar *ExternalID, |
| 40 | const xmlChar *SystemID); |
| 41 | xmlEntityPtr xmlSAX2GetEntity (void *ctx, |
| 42 | const xmlChar *name); |
| 43 | xmlEntityPtr xmlSAX2GetParameterEntity (void *ctx, |
| 44 | const xmlChar *name); |
| 45 | xmlParserInputPtr xmlSAX2ResolveEntity (void *ctx, |
| 46 | const xmlChar *publicId, |
| 47 | const xmlChar *systemId); |
| 48 | |
| 49 | void xmlSAX2EntityDecl (void *ctx, |
| 50 | const xmlChar *name, |
| 51 | int type, |
| 52 | const xmlChar *publicId, |
| 53 | const xmlChar *systemId, |
| 54 | xmlChar *content); |
| 55 | void xmlSAX2AttributeDecl (void *ctx, |
| 56 | const xmlChar *elem, |
| 57 | const xmlChar *fullname, |
| 58 | int type, |
| 59 | int def, |
| 60 | const xmlChar *defaultValue, |
| 61 | xmlEnumerationPtr tree); |
| 62 | void xmlSAX2ElementDecl (void *ctx, |
| 63 | const xmlChar *name, |
| 64 | int type, |
| 65 | xmlElementContentPtr content); |
| 66 | void xmlSAX2NotationDecl (void *ctx, |
| 67 | const xmlChar *name, |
| 68 | const xmlChar *publicId, |
| 69 | const xmlChar *systemId); |
| 70 | void xmlSAX2UnparsedEntityDecl (void *ctx, |
| 71 | const xmlChar *name, |
| 72 | const xmlChar *publicId, |
| 73 | const xmlChar *systemId, |
| 74 | const xmlChar *notationName); |
| 75 | |
| 76 | void xmlSAX2StartDocument (void *ctx); |
| 77 | void xmlSAX2EndDocument (void *ctx); |
| 78 | void xmlSAX2StartElement (void *ctx, |
| 79 | const xmlChar *fullname, |
| 80 | const xmlChar **atts); |
| 81 | void xmlSAX2EndElement (void *ctx, |
| 82 | const xmlChar *name); |
| 83 | void xmlSAX2Reference (void *ctx, |
| 84 | const xmlChar *name); |
| 85 | void xmlSAX2Characters (void *ctx, |
| 86 | const xmlChar *ch, |
| 87 | int len); |
| 88 | void xmlSAX2IgnorableWhitespace (void *ctx, |
| 89 | const xmlChar *ch, |
| 90 | int len); |
| 91 | void xmlSAX2ProcessingInstruction (void *ctx, |
| 92 | const xmlChar *target, |
| 93 | const xmlChar *data); |
| 94 | void xmlSAX2GlobalNamespace (void *ctx, |
| 95 | const xmlChar *href, |
| 96 | const xmlChar *prefix); |
| 97 | void xmlSAX2SetNamespace (void *ctx, |
| 98 | const xmlChar *name); |
| 99 | xmlNsPtr xmlSAX2GetNamespace (void *ctx); |
| 100 | int xmlSAX2CheckNamespace (void *ctx, |
| 101 | xmlChar *nameSpace); |
| 102 | void xmlSAX2NamespaceDecl (void *ctx, |
| 103 | const xmlChar *href, |
| 104 | const xmlChar *prefix); |
| 105 | void xmlSAX2Comment (void *ctx, |
| 106 | const xmlChar *value); |
| 107 | void xmlSAX2CDataBlock (void *ctx, |
| 108 | const xmlChar *value, |
| 109 | int len); |
| 110 | |
| 111 | void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, |
| 112 | int warning); |
| 113 | #ifdef LIBXML_HTML_ENABLED |
| 114 | void xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); |
| 115 | #endif |
| 116 | #ifdef LIBXML_DOCB_ENABLED |
| 117 | void xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr); |
| 118 | #endif |
| 119 | void xmlDefaultSAXHandlerInit (void); |
| 120 | void htmlDefaultSAXHandlerInit (void); |
| 121 | void docbDefaultSAXHandlerInit (void); |
| 122 | #ifdef __cplusplus |
| 123 | } |
| 124 | #endif |
| 125 | #endif /* __XML_SAX2_H__ */ |