• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Summary: old DocBook SGML parser
3  * Description: interface for a DocBook SGML non-verifying parser
4  * This code is DEPRECATED, and should not be used anymore.
5  *
6  * Copy: See Copyright for the status of this software.
7  *
8  * Author: Daniel Veillard
9  */
10 
11 #ifndef __DOCB_PARSER_H__
12 #define __DOCB_PARSER_H__
13 #include <libxml/xmlversion.h>
14 
15 #ifdef LIBXML_DOCB_ENABLED
16 
17 #include <libxml/parser.h>
18 #include <libxml/parserInternals.h>
19 
20 #ifndef IN_LIBXML
21 #ifdef __GNUC__
22 #warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
23 #endif
24 #endif
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /*
31  * Most of the back-end structures from XML and SGML are shared.
32  */
33 typedef xmlParserCtxt docbParserCtxt;
34 typedef xmlParserCtxtPtr docbParserCtxtPtr;
35 typedef xmlSAXHandler docbSAXHandler;
36 typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
37 typedef xmlParserInput docbParserInput;
38 typedef xmlParserInputPtr docbParserInputPtr;
39 typedef xmlDocPtr docbDocPtr;
40 
41 /*
42  * There is only few public functions.
43  */
44 XMLPUBFUN int XMLCALL
45 		     docbEncodeEntities(unsigned char *out,
46                                         int *outlen,
47                                         const unsigned char *in,
48                                         int *inlen, int quoteChar);
49 
50 XMLPUBFUN docbDocPtr XMLCALL
51 		     docbSAXParseDoc   (xmlChar *cur,
52                                         const char *encoding,
53                                         docbSAXHandlerPtr sax,
54                                         void *userData);
55 XMLPUBFUN docbDocPtr XMLCALL
56 		     docbParseDoc      (xmlChar *cur,
57                                         const char *encoding);
58 XMLPUBFUN docbDocPtr XMLCALL
59 		     docbSAXParseFile  (const char *filename,
60                                         const char *encoding,
61                                         docbSAXHandlerPtr sax,
62                                         void *userData);
63 XMLPUBFUN docbDocPtr XMLCALL
64 		     docbParseFile     (const char *filename,
65                                         const char *encoding);
66 
67 /**
68  * Interfaces for the Push mode.
69  */
70 XMLPUBFUN void XMLCALL
71 		     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
72 XMLPUBFUN docbParserCtxtPtr XMLCALL
73 		     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
74                                               void *user_data,
75                                               const char *chunk,
76                                               int size,
77                                               const char *filename,
78                                               xmlCharEncoding enc);
79 XMLPUBFUN int XMLCALL
80 		     docbParseChunk          (docbParserCtxtPtr ctxt,
81                                               const char *chunk,
82                                               int size,
83                                               int terminate);
84 XMLPUBFUN docbParserCtxtPtr XMLCALL
85 		     docbCreateFileParserCtxt(const char *filename,
86                                               const char *encoding);
87 XMLPUBFUN int XMLCALL
88 		     docbParseDocument       (docbParserCtxtPtr ctxt);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* LIBXML_DOCB_ENABLED */
95 
96 #endif /* __DOCB_PARSER_H__ */
97