You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
4.8 KiB

4 years ago
  1. /*
  2. * Summary: SAX2 parser interface used to build the DOM tree
  3. * Description: those are the default SAX2 interfaces used by
  4. * the library when building DOM tree.
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. */
  10. #ifndef __XML_SAX2_H__
  11. #define __XML_SAX2_H__
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. #include <libxml/xmlversion.h>
  15. #include <libxml/parser.h>
  16. #include <libxml/xlink.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. XMLPUBFUN const xmlChar * XMLCALL
  21. xmlSAX2GetPublicId (void *ctx);
  22. XMLPUBFUN const xmlChar * XMLCALL
  23. xmlSAX2GetSystemId (void *ctx);
  24. XMLPUBFUN void XMLCALL
  25. xmlSAX2SetDocumentLocator (void *ctx,
  26. xmlSAXLocatorPtr loc);
  27. XMLPUBFUN int XMLCALL
  28. xmlSAX2GetLineNumber (void *ctx);
  29. XMLPUBFUN int XMLCALL
  30. xmlSAX2GetColumnNumber (void *ctx);
  31. XMLPUBFUN int XMLCALL
  32. xmlSAX2IsStandalone (void *ctx);
  33. XMLPUBFUN int XMLCALL
  34. xmlSAX2HasInternalSubset (void *ctx);
  35. XMLPUBFUN int XMLCALL
  36. xmlSAX2HasExternalSubset (void *ctx);
  37. XMLPUBFUN void XMLCALL
  38. xmlSAX2InternalSubset (void *ctx,
  39. const xmlChar *name,
  40. const xmlChar *ExternalID,
  41. const xmlChar *SystemID);
  42. XMLPUBFUN void XMLCALL
  43. xmlSAX2ExternalSubset (void *ctx,
  44. const xmlChar *name,
  45. const xmlChar *ExternalID,
  46. const xmlChar *SystemID);
  47. XMLPUBFUN xmlEntityPtr XMLCALL
  48. xmlSAX2GetEntity (void *ctx,
  49. const xmlChar *name);
  50. XMLPUBFUN xmlEntityPtr XMLCALL
  51. xmlSAX2GetParameterEntity (void *ctx,
  52. const xmlChar *name);
  53. XMLPUBFUN xmlParserInputPtr XMLCALL
  54. xmlSAX2ResolveEntity (void *ctx,
  55. const xmlChar *publicId,
  56. const xmlChar *systemId);
  57. XMLPUBFUN void XMLCALL
  58. xmlSAX2EntityDecl (void *ctx,
  59. const xmlChar *name,
  60. int type,
  61. const xmlChar *publicId,
  62. const xmlChar *systemId,
  63. xmlChar *content);
  64. XMLPUBFUN void XMLCALL
  65. xmlSAX2AttributeDecl (void *ctx,
  66. const xmlChar *elem,
  67. const xmlChar *fullname,
  68. int type,
  69. int def,
  70. const xmlChar *defaultValue,
  71. xmlEnumerationPtr tree);
  72. XMLPUBFUN void XMLCALL
  73. xmlSAX2ElementDecl (void *ctx,
  74. const xmlChar *name,
  75. int type,
  76. xmlElementContentPtr content);
  77. XMLPUBFUN void XMLCALL
  78. xmlSAX2NotationDecl (void *ctx,
  79. const xmlChar *name,
  80. const xmlChar *publicId,
  81. const xmlChar *systemId);
  82. XMLPUBFUN void XMLCALL
  83. xmlSAX2UnparsedEntityDecl (void *ctx,
  84. const xmlChar *name,
  85. const xmlChar *publicId,
  86. const xmlChar *systemId,
  87. const xmlChar *notationName);
  88. XMLPUBFUN void XMLCALL
  89. xmlSAX2StartDocument (void *ctx);
  90. XMLPUBFUN void XMLCALL
  91. xmlSAX2EndDocument (void *ctx);
  92. #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
  93. defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
  94. defined(LIBXML_LEGACY_ENABLED)
  95. XMLPUBFUN void XMLCALL
  96. xmlSAX2StartElement (void *ctx,
  97. const xmlChar *fullname,
  98. const xmlChar **atts);
  99. XMLPUBFUN void XMLCALL
  100. xmlSAX2EndElement (void *ctx,
  101. const xmlChar *name);
  102. #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
  103. XMLPUBFUN void XMLCALL
  104. xmlSAX2StartElementNs (void *ctx,
  105. const xmlChar *localname,
  106. const xmlChar *prefix,
  107. const xmlChar *URI,
  108. int nb_namespaces,
  109. const xmlChar **namespaces,
  110. int nb_attributes,
  111. int nb_defaulted,
  112. const xmlChar **attributes);
  113. XMLPUBFUN void XMLCALL
  114. xmlSAX2EndElementNs (void *ctx,
  115. const xmlChar *localname,
  116. const xmlChar *prefix,
  117. const xmlChar *URI);
  118. XMLPUBFUN void XMLCALL
  119. xmlSAX2Reference (void *ctx,
  120. const xmlChar *name);
  121. XMLPUBFUN void XMLCALL
  122. xmlSAX2Characters (void *ctx,
  123. const xmlChar *ch,
  124. int len);
  125. XMLPUBFUN void XMLCALL
  126. xmlSAX2IgnorableWhitespace (void *ctx,
  127. const xmlChar *ch,
  128. int len);
  129. XMLPUBFUN void XMLCALL
  130. xmlSAX2ProcessingInstruction (void *ctx,
  131. const xmlChar *target,
  132. const xmlChar *data);
  133. XMLPUBFUN void XMLCALL
  134. xmlSAX2Comment (void *ctx,
  135. const xmlChar *value);
  136. XMLPUBFUN void XMLCALL
  137. xmlSAX2CDataBlock (void *ctx,
  138. const xmlChar *value,
  139. int len);
  140. #ifdef LIBXML_SAX1_ENABLED
  141. XMLPUBFUN int XMLCALL
  142. xmlSAXDefaultVersion (int version);
  143. #endif /* LIBXML_SAX1_ENABLED */
  144. XMLPUBFUN int XMLCALL
  145. xmlSAXVersion (xmlSAXHandler *hdlr,
  146. int version);
  147. XMLPUBFUN void XMLCALL
  148. xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
  149. int warning);
  150. #ifdef LIBXML_HTML_ENABLED
  151. XMLPUBFUN void XMLCALL
  152. xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
  153. XMLPUBFUN void XMLCALL
  154. htmlDefaultSAXHandlerInit (void);
  155. #endif
  156. #ifdef LIBXML_DOCB_ENABLED
  157. XMLPUBFUN void XMLCALL
  158. xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
  159. XMLPUBFUN void XMLCALL
  160. docbDefaultSAXHandlerInit (void);
  161. #endif
  162. XMLPUBFUN void XMLCALL
  163. xmlDefaultSAXHandlerInit (void);
  164. #ifdef __cplusplus
  165. }
  166. #endif
  167. #endif /* __XML_SAX2_H__ */