• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* libxml2 - Library for parsing XML documents
2  * Copyright (C) 2006-2019 Free Software Foundation, Inc.
3  *
4  * This file is not part of the GNU gettext program, but is used with
5  * GNU gettext.
6  *
7  * The original copyright notice is as follows:
8  */
9 
10 /*
11  * Copyright (C) 1998-2012 Daniel Veillard.  All Rights Reserved.
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a copy
14  * of this software and associated documentation files (the "Software"), to deal
15  * in the Software without restriction, including without limitation the rights
16  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17  * copies of the Software, and to permit persons to whom the Software is fur-
18  * nished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in
21  * all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
25  * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
26  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29  * THE SOFTWARE.
30  *
31  * Author: Daniel Veillard
32  */
33 
34 /*
35  * Summary: old DocBook SGML parser
36  * Description: interface for a DocBook SGML non-verifying parser
37  * This code is DEPRECATED, and should not be used anymore.
38  */
39 
40 #ifndef __DOCB_PARSER_H__
41 #define __DOCB_PARSER_H__
42 #include <libxml/xmlversion.h>
43 
44 #ifdef LIBXML_DOCB_ENABLED
45 
46 #include <libxml/parser.h>
47 #include <libxml/parserInternals.h>
48 
49 #ifndef IN_LIBXML
50 #ifdef __GNUC__
51 #warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
52 #endif
53 #endif
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /*
60  * Most of the back-end structures from XML and SGML are shared.
61  */
62 typedef xmlParserCtxt docbParserCtxt;
63 typedef xmlParserCtxtPtr docbParserCtxtPtr;
64 typedef xmlSAXHandler docbSAXHandler;
65 typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
66 typedef xmlParserInput docbParserInput;
67 typedef xmlParserInputPtr docbParserInputPtr;
68 typedef xmlDocPtr docbDocPtr;
69 
70 /*
71  * There is only few public functions.
72  */
73 XMLPUBFUN int XMLCALL
74 		     docbEncodeEntities(unsigned char *out,
75                                         int *outlen,
76                                         const unsigned char *in,
77                                         int *inlen, int quoteChar);
78 
79 XMLPUBFUN docbDocPtr XMLCALL
80 		     docbSAXParseDoc   (xmlChar *cur,
81                                         const char *encoding,
82                                         docbSAXHandlerPtr sax,
83                                         void *userData);
84 XMLPUBFUN docbDocPtr XMLCALL
85 		     docbParseDoc      (xmlChar *cur,
86                                         const char *encoding);
87 XMLPUBFUN docbDocPtr XMLCALL
88 		     docbSAXParseFile  (const char *filename,
89                                         const char *encoding,
90                                         docbSAXHandlerPtr sax,
91                                         void *userData);
92 XMLPUBFUN docbDocPtr XMLCALL
93 		     docbParseFile     (const char *filename,
94                                         const char *encoding);
95 
96 /**
97  * Interfaces for the Push mode.
98  */
99 XMLPUBFUN void XMLCALL
100 		     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
101 XMLPUBFUN docbParserCtxtPtr XMLCALL
102 		     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
103                                               void *user_data,
104                                               const char *chunk,
105                                               int size,
106                                               const char *filename,
107                                               xmlCharEncoding enc);
108 XMLPUBFUN int XMLCALL
109 		     docbParseChunk          (docbParserCtxtPtr ctxt,
110                                               const char *chunk,
111                                               int size,
112                                               int terminate);
113 XMLPUBFUN docbParserCtxtPtr XMLCALL
114 		     docbCreateFileParserCtxt(const char *filename,
115                                               const char *encoding);
116 XMLPUBFUN int XMLCALL
117 		     docbParseDocument       (docbParserCtxtPtr ctxt);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* LIBXML_DOCB_ENABLED */
124 
125 #endif /* __DOCB_PARSER_H__ */
126