nokogiri 1.18.0.rc1-aarch64-linux-musl
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +38 -0
- data/LICENSE-DEPENDENCIES.md +2224 -0
- data/LICENSE.md +9 -0
- data/README.md +293 -0
- data/bin/nokogiri +131 -0
- data/dependencies.yml +42 -0
- data/ext/nokogiri/depend +38 -0
- data/ext/nokogiri/extconf.rb +1173 -0
- data/ext/nokogiri/gumbo.c +610 -0
- data/ext/nokogiri/html4_document.c +171 -0
- data/ext/nokogiri/html4_element_description.c +299 -0
- data/ext/nokogiri/html4_entity_lookup.c +37 -0
- data/ext/nokogiri/html4_sax_parser.c +40 -0
- data/ext/nokogiri/html4_sax_parser_context.c +98 -0
- data/ext/nokogiri/html4_sax_push_parser.c +96 -0
- data/ext/nokogiri/include/libexslt/exslt.h +108 -0
- data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
- data/ext/nokogiri/include/libexslt/exsltexports.h +63 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +336 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX.h +202 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX2.h +171 -0
- data/ext/nokogiri/include/libxml2/libxml/c14n.h +115 -0
- data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
- data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
- data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
- data/ext/nokogiri/include/libxml2/libxml/dict.h +82 -0
- data/ext/nokogiri/include/libxml2/libxml/encoding.h +244 -0
- data/ext/nokogiri/include/libxml2/libxml/entities.h +166 -0
- data/ext/nokogiri/include/libxml2/libxml/globals.h +41 -0
- data/ext/nokogiri/include/libxml2/libxml/hash.h +251 -0
- data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
- data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +186 -0
- data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +98 -0
- data/ext/nokogiri/include/libxml2/libxml/parser.h +1390 -0
- data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +671 -0
- data/ext/nokogiri/include/libxml2/libxml/pattern.h +106 -0
- data/ext/nokogiri/include/libxml2/libxml/relaxng.h +219 -0
- data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +959 -0
- data/ext/nokogiri/include/libxml2/libxml/schematron.h +143 -0
- data/ext/nokogiri/include/libxml2/libxml/threads.h +87 -0
- data/ext/nokogiri/include/libxml2/libxml/tree.h +1382 -0
- data/ext/nokogiri/include/libxml2/libxml/uri.h +106 -0
- data/ext/nokogiri/include/libxml2/libxml/valid.h +477 -0
- data/ext/nokogiri/include/libxml2/libxml/xinclude.h +136 -0
- data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +438 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +962 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +146 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +188 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +436 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +215 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +102 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +249 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +152 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +366 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +347 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +489 -0
- data/ext/nokogiri/include/libxml2/libxml/xpath.h +579 -0
- data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +633 -0
- data/ext/nokogiri/include/libxml2/libxml/xpointer.h +138 -0
- data/ext/nokogiri/include/libxslt/attributes.h +39 -0
- data/ext/nokogiri/include/libxslt/documents.h +93 -0
- data/ext/nokogiri/include/libxslt/extensions.h +262 -0
- data/ext/nokogiri/include/libxslt/extra.h +72 -0
- data/ext/nokogiri/include/libxslt/functions.h +78 -0
- data/ext/nokogiri/include/libxslt/imports.h +75 -0
- data/ext/nokogiri/include/libxslt/keys.h +53 -0
- data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
- data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
- data/ext/nokogiri/include/libxslt/pattern.h +84 -0
- data/ext/nokogiri/include/libxslt/preproc.h +43 -0
- data/ext/nokogiri/include/libxslt/security.h +104 -0
- data/ext/nokogiri/include/libxslt/templates.h +77 -0
- data/ext/nokogiri/include/libxslt/transform.h +207 -0
- data/ext/nokogiri/include/libxslt/variables.h +118 -0
- data/ext/nokogiri/include/libxslt/xslt.h +110 -0
- data/ext/nokogiri/include/libxslt/xsltInternals.h +1995 -0
- data/ext/nokogiri/include/libxslt/xsltconfig.h +146 -0
- data/ext/nokogiri/include/libxslt/xsltexports.h +64 -0
- data/ext/nokogiri/include/libxslt/xsltlocale.h +44 -0
- data/ext/nokogiri/include/libxslt/xsltutils.h +343 -0
- data/ext/nokogiri/libxml2_polyfill.c +114 -0
- data/ext/nokogiri/nokogiri.c +294 -0
- data/ext/nokogiri/nokogiri.h +238 -0
- data/ext/nokogiri/test_global_handlers.c +40 -0
- data/ext/nokogiri/xml_attr.c +103 -0
- data/ext/nokogiri/xml_attribute_decl.c +70 -0
- data/ext/nokogiri/xml_cdata.c +62 -0
- data/ext/nokogiri/xml_comment.c +57 -0
- data/ext/nokogiri/xml_document.c +784 -0
- data/ext/nokogiri/xml_document_fragment.c +29 -0
- data/ext/nokogiri/xml_dtd.c +208 -0
- data/ext/nokogiri/xml_element_content.c +131 -0
- data/ext/nokogiri/xml_element_decl.c +69 -0
- data/ext/nokogiri/xml_encoding_handler.c +112 -0
- data/ext/nokogiri/xml_entity_decl.c +112 -0
- data/ext/nokogiri/xml_entity_reference.c +50 -0
- data/ext/nokogiri/xml_namespace.c +181 -0
- data/ext/nokogiri/xml_node.c +2459 -0
- data/ext/nokogiri/xml_node_set.c +518 -0
- data/ext/nokogiri/xml_processing_instruction.c +54 -0
- data/ext/nokogiri/xml_reader.c +777 -0
- data/ext/nokogiri/xml_relax_ng.c +149 -0
- data/ext/nokogiri/xml_sax_parser.c +403 -0
- data/ext/nokogiri/xml_sax_parser_context.c +390 -0
- data/ext/nokogiri/xml_sax_push_parser.c +206 -0
- data/ext/nokogiri/xml_schema.c +226 -0
- data/ext/nokogiri/xml_syntax_error.c +93 -0
- data/ext/nokogiri/xml_text.c +59 -0
- data/ext/nokogiri/xml_xpath_context.c +502 -0
- data/ext/nokogiri/xslt_stylesheet.c +421 -0
- data/gumbo-parser/CHANGES.md +63 -0
- data/gumbo-parser/Makefile +129 -0
- data/gumbo-parser/THANKS +27 -0
- data/lib/nokogiri/3.1/nokogiri.so +0 -0
- data/lib/nokogiri/3.2/nokogiri.so +0 -0
- data/lib/nokogiri/3.3/nokogiri.so +0 -0
- data/lib/nokogiri/3.4/nokogiri.so +0 -0
- data/lib/nokogiri/class_resolver.rb +67 -0
- data/lib/nokogiri/css/node.rb +58 -0
- data/lib/nokogiri/css/parser.rb +772 -0
- data/lib/nokogiri/css/parser.y +277 -0
- data/lib/nokogiri/css/parser_extras.rb +36 -0
- data/lib/nokogiri/css/selector_cache.rb +38 -0
- data/lib/nokogiri/css/syntax_error.rb +9 -0
- data/lib/nokogiri/css/tokenizer.rb +155 -0
- data/lib/nokogiri/css/tokenizer.rex +57 -0
- data/lib/nokogiri/css/xpath_visitor.rb +375 -0
- data/lib/nokogiri/css.rb +132 -0
- data/lib/nokogiri/decorators/slop.rb +42 -0
- data/lib/nokogiri/encoding_handler.rb +57 -0
- data/lib/nokogiri/extension.rb +32 -0
- data/lib/nokogiri/gumbo.rb +15 -0
- data/lib/nokogiri/html.rb +48 -0
- data/lib/nokogiri/html4/builder.rb +37 -0
- data/lib/nokogiri/html4/document.rb +235 -0
- data/lib/nokogiri/html4/document_fragment.rb +166 -0
- data/lib/nokogiri/html4/element_description.rb +25 -0
- data/lib/nokogiri/html4/element_description_defaults.rb +2040 -0
- data/lib/nokogiri/html4/encoding_reader.rb +121 -0
- data/lib/nokogiri/html4/entity_lookup.rb +15 -0
- data/lib/nokogiri/html4/sax/parser.rb +48 -0
- data/lib/nokogiri/html4/sax/parser_context.rb +15 -0
- data/lib/nokogiri/html4/sax/push_parser.rb +37 -0
- data/lib/nokogiri/html4.rb +42 -0
- data/lib/nokogiri/html5/builder.rb +40 -0
- data/lib/nokogiri/html5/document.rb +199 -0
- data/lib/nokogiri/html5/document_fragment.rb +200 -0
- data/lib/nokogiri/html5/node.rb +103 -0
- data/lib/nokogiri/html5.rb +368 -0
- data/lib/nokogiri/jruby/dependencies.rb +3 -0
- data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
- data/lib/nokogiri/syntax_error.rb +6 -0
- data/lib/nokogiri/version/constant.rb +6 -0
- data/lib/nokogiri/version/info.rb +224 -0
- data/lib/nokogiri/version.rb +4 -0
- data/lib/nokogiri/xml/attr.rb +66 -0
- data/lib/nokogiri/xml/attribute_decl.rb +22 -0
- data/lib/nokogiri/xml/builder.rb +494 -0
- data/lib/nokogiri/xml/cdata.rb +13 -0
- data/lib/nokogiri/xml/character_data.rb +9 -0
- data/lib/nokogiri/xml/document.rb +514 -0
- data/lib/nokogiri/xml/document_fragment.rb +276 -0
- data/lib/nokogiri/xml/dtd.rb +34 -0
- data/lib/nokogiri/xml/element_content.rb +46 -0
- data/lib/nokogiri/xml/element_decl.rb +17 -0
- data/lib/nokogiri/xml/entity_decl.rb +23 -0
- data/lib/nokogiri/xml/entity_reference.rb +20 -0
- data/lib/nokogiri/xml/namespace.rb +57 -0
- data/lib/nokogiri/xml/node/save_options.rb +76 -0
- data/lib/nokogiri/xml/node.rb +1650 -0
- data/lib/nokogiri/xml/node_set.rb +449 -0
- data/lib/nokogiri/xml/notation.rb +19 -0
- data/lib/nokogiri/xml/parse_options.rb +213 -0
- data/lib/nokogiri/xml/pp/character_data.rb +21 -0
- data/lib/nokogiri/xml/pp/node.rb +73 -0
- data/lib/nokogiri/xml/pp.rb +4 -0
- data/lib/nokogiri/xml/processing_instruction.rb +11 -0
- data/lib/nokogiri/xml/reader.rb +139 -0
- data/lib/nokogiri/xml/relax_ng.rb +75 -0
- data/lib/nokogiri/xml/sax/document.rb +258 -0
- data/lib/nokogiri/xml/sax/parser.rb +199 -0
- data/lib/nokogiri/xml/sax/parser_context.rb +129 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +64 -0
- data/lib/nokogiri/xml/sax.rb +54 -0
- data/lib/nokogiri/xml/schema.rb +140 -0
- data/lib/nokogiri/xml/searchable.rb +297 -0
- data/lib/nokogiri/xml/syntax_error.rb +94 -0
- data/lib/nokogiri/xml/text.rb +11 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +13 -0
- data/lib/nokogiri/xml/xpath.rb +21 -0
- data/lib/nokogiri/xml/xpath_context.rb +49 -0
- data/lib/nokogiri/xml.rb +65 -0
- data/lib/nokogiri/xslt/stylesheet.rb +49 -0
- data/lib/nokogiri/xslt.rb +129 -0
- data/lib/nokogiri.rb +128 -0
- data/lib/xsd/xmlparser/nokogiri.rb +105 -0
- metadata +324 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
/**
|
2
|
+
* Summary: interfaces to the Catalog handling system
|
3
|
+
* Description: the catalog module implements the support for
|
4
|
+
* XML Catalogs and SGML catalogs
|
5
|
+
*
|
6
|
+
* SGML Open Technical Resolution TR9401:1997.
|
7
|
+
* http://www.jclark.com/sp/catalog.htm
|
8
|
+
*
|
9
|
+
* XML Catalogs Working Draft 06 August 2001
|
10
|
+
* http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
|
11
|
+
*
|
12
|
+
* Copy: See Copyright for the status of this software.
|
13
|
+
*
|
14
|
+
* Author: Daniel Veillard
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifndef __XML_CATALOG_H__
|
18
|
+
#define __XML_CATALOG_H__
|
19
|
+
|
20
|
+
#include <stdio.h>
|
21
|
+
|
22
|
+
#include <libxml/xmlversion.h>
|
23
|
+
#include <libxml/xmlstring.h>
|
24
|
+
#include <libxml/tree.h>
|
25
|
+
|
26
|
+
#ifdef LIBXML_CATALOG_ENABLED
|
27
|
+
|
28
|
+
#ifdef __cplusplus
|
29
|
+
extern "C" {
|
30
|
+
#endif
|
31
|
+
|
32
|
+
/**
|
33
|
+
* XML_CATALOGS_NAMESPACE:
|
34
|
+
*
|
35
|
+
* The namespace for the XML Catalogs elements.
|
36
|
+
*/
|
37
|
+
#define XML_CATALOGS_NAMESPACE \
|
38
|
+
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
39
|
+
/**
|
40
|
+
* XML_CATALOG_PI:
|
41
|
+
*
|
42
|
+
* The specific XML Catalog Processing Instruction name.
|
43
|
+
*/
|
44
|
+
#define XML_CATALOG_PI \
|
45
|
+
(const xmlChar *) "oasis-xml-catalog"
|
46
|
+
|
47
|
+
/*
|
48
|
+
* The API is voluntarily limited to general cataloging.
|
49
|
+
*/
|
50
|
+
typedef enum {
|
51
|
+
XML_CATA_PREFER_NONE = 0,
|
52
|
+
XML_CATA_PREFER_PUBLIC = 1,
|
53
|
+
XML_CATA_PREFER_SYSTEM
|
54
|
+
} xmlCatalogPrefer;
|
55
|
+
|
56
|
+
typedef enum {
|
57
|
+
XML_CATA_ALLOW_NONE = 0,
|
58
|
+
XML_CATA_ALLOW_GLOBAL = 1,
|
59
|
+
XML_CATA_ALLOW_DOCUMENT = 2,
|
60
|
+
XML_CATA_ALLOW_ALL = 3
|
61
|
+
} xmlCatalogAllow;
|
62
|
+
|
63
|
+
typedef struct _xmlCatalog xmlCatalog;
|
64
|
+
typedef xmlCatalog *xmlCatalogPtr;
|
65
|
+
|
66
|
+
/*
|
67
|
+
* Operations on a given catalog.
|
68
|
+
*/
|
69
|
+
XMLPUBFUN xmlCatalogPtr
|
70
|
+
xmlNewCatalog (int sgml);
|
71
|
+
XMLPUBFUN xmlCatalogPtr
|
72
|
+
xmlLoadACatalog (const char *filename);
|
73
|
+
XMLPUBFUN xmlCatalogPtr
|
74
|
+
xmlLoadSGMLSuperCatalog (const char *filename);
|
75
|
+
XMLPUBFUN int
|
76
|
+
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
77
|
+
XMLPUBFUN int
|
78
|
+
xmlACatalogAdd (xmlCatalogPtr catal,
|
79
|
+
const xmlChar *type,
|
80
|
+
const xmlChar *orig,
|
81
|
+
const xmlChar *replace);
|
82
|
+
XMLPUBFUN int
|
83
|
+
xmlACatalogRemove (xmlCatalogPtr catal,
|
84
|
+
const xmlChar *value);
|
85
|
+
XMLPUBFUN xmlChar *
|
86
|
+
xmlACatalogResolve (xmlCatalogPtr catal,
|
87
|
+
const xmlChar *pubID,
|
88
|
+
const xmlChar *sysID);
|
89
|
+
XMLPUBFUN xmlChar *
|
90
|
+
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
91
|
+
const xmlChar *sysID);
|
92
|
+
XMLPUBFUN xmlChar *
|
93
|
+
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
94
|
+
const xmlChar *pubID);
|
95
|
+
XMLPUBFUN xmlChar *
|
96
|
+
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
97
|
+
const xmlChar *URI);
|
98
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
99
|
+
XMLPUBFUN void
|
100
|
+
xmlACatalogDump (xmlCatalogPtr catal,
|
101
|
+
FILE *out);
|
102
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
103
|
+
XMLPUBFUN void
|
104
|
+
xmlFreeCatalog (xmlCatalogPtr catal);
|
105
|
+
XMLPUBFUN int
|
106
|
+
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
107
|
+
|
108
|
+
/*
|
109
|
+
* Global operations.
|
110
|
+
*/
|
111
|
+
XMLPUBFUN void
|
112
|
+
xmlInitializeCatalog (void);
|
113
|
+
XMLPUBFUN int
|
114
|
+
xmlLoadCatalog (const char *filename);
|
115
|
+
XMLPUBFUN void
|
116
|
+
xmlLoadCatalogs (const char *paths);
|
117
|
+
XMLPUBFUN void
|
118
|
+
xmlCatalogCleanup (void);
|
119
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
120
|
+
XMLPUBFUN void
|
121
|
+
xmlCatalogDump (FILE *out);
|
122
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
123
|
+
XMLPUBFUN xmlChar *
|
124
|
+
xmlCatalogResolve (const xmlChar *pubID,
|
125
|
+
const xmlChar *sysID);
|
126
|
+
XMLPUBFUN xmlChar *
|
127
|
+
xmlCatalogResolveSystem (const xmlChar *sysID);
|
128
|
+
XMLPUBFUN xmlChar *
|
129
|
+
xmlCatalogResolvePublic (const xmlChar *pubID);
|
130
|
+
XMLPUBFUN xmlChar *
|
131
|
+
xmlCatalogResolveURI (const xmlChar *URI);
|
132
|
+
XMLPUBFUN int
|
133
|
+
xmlCatalogAdd (const xmlChar *type,
|
134
|
+
const xmlChar *orig,
|
135
|
+
const xmlChar *replace);
|
136
|
+
XMLPUBFUN int
|
137
|
+
xmlCatalogRemove (const xmlChar *value);
|
138
|
+
XMLPUBFUN xmlDocPtr
|
139
|
+
xmlParseCatalogFile (const char *filename);
|
140
|
+
XMLPUBFUN int
|
141
|
+
xmlCatalogConvert (void);
|
142
|
+
|
143
|
+
/*
|
144
|
+
* Strictly minimal interfaces for per-document catalogs used
|
145
|
+
* by the parser.
|
146
|
+
*/
|
147
|
+
XMLPUBFUN void
|
148
|
+
xmlCatalogFreeLocal (void *catalogs);
|
149
|
+
XMLPUBFUN void *
|
150
|
+
xmlCatalogAddLocal (void *catalogs,
|
151
|
+
const xmlChar *URL);
|
152
|
+
XMLPUBFUN xmlChar *
|
153
|
+
xmlCatalogLocalResolve (void *catalogs,
|
154
|
+
const xmlChar *pubID,
|
155
|
+
const xmlChar *sysID);
|
156
|
+
XMLPUBFUN xmlChar *
|
157
|
+
xmlCatalogLocalResolveURI(void *catalogs,
|
158
|
+
const xmlChar *URI);
|
159
|
+
/*
|
160
|
+
* Preference settings.
|
161
|
+
*/
|
162
|
+
XMLPUBFUN int
|
163
|
+
xmlCatalogSetDebug (int level);
|
164
|
+
XMLPUBFUN xmlCatalogPrefer
|
165
|
+
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
166
|
+
XMLPUBFUN void
|
167
|
+
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
168
|
+
XMLPUBFUN xmlCatalogAllow
|
169
|
+
xmlCatalogGetDefaults (void);
|
170
|
+
|
171
|
+
|
172
|
+
/* DEPRECATED interfaces */
|
173
|
+
XMLPUBFUN const xmlChar *
|
174
|
+
xmlCatalogGetSystem (const xmlChar *sysID);
|
175
|
+
XMLPUBFUN const xmlChar *
|
176
|
+
xmlCatalogGetPublic (const xmlChar *pubID);
|
177
|
+
|
178
|
+
#ifdef __cplusplus
|
179
|
+
}
|
180
|
+
#endif
|
181
|
+
#endif /* LIBXML_CATALOG_ENABLED */
|
182
|
+
#endif /* __XML_CATALOG_H__ */
|
@@ -0,0 +1,230 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Unicode character range checking
|
3
|
+
* Description: this module exports interfaces for the character
|
4
|
+
* range validation APIs
|
5
|
+
*
|
6
|
+
* This file is automatically generated from the cvs source
|
7
|
+
* definition files using the genChRanges.py Python script
|
8
|
+
*
|
9
|
+
* Generation date: Mon Mar 27 11:09:48 2006
|
10
|
+
* Sources: chvalid.def
|
11
|
+
* Author: William Brack <wbrack@mmm.com.hk>
|
12
|
+
*/
|
13
|
+
|
14
|
+
#ifndef __XML_CHVALID_H__
|
15
|
+
#define __XML_CHVALID_H__
|
16
|
+
|
17
|
+
#include <libxml/xmlversion.h>
|
18
|
+
#include <libxml/xmlstring.h>
|
19
|
+
|
20
|
+
#ifdef __cplusplus
|
21
|
+
extern "C" {
|
22
|
+
#endif
|
23
|
+
|
24
|
+
/*
|
25
|
+
* Define our typedefs and structures
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
typedef struct _xmlChSRange xmlChSRange;
|
29
|
+
typedef xmlChSRange *xmlChSRangePtr;
|
30
|
+
struct _xmlChSRange {
|
31
|
+
unsigned short low;
|
32
|
+
unsigned short high;
|
33
|
+
};
|
34
|
+
|
35
|
+
typedef struct _xmlChLRange xmlChLRange;
|
36
|
+
typedef xmlChLRange *xmlChLRangePtr;
|
37
|
+
struct _xmlChLRange {
|
38
|
+
unsigned int low;
|
39
|
+
unsigned int high;
|
40
|
+
};
|
41
|
+
|
42
|
+
typedef struct _xmlChRangeGroup xmlChRangeGroup;
|
43
|
+
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
|
44
|
+
struct _xmlChRangeGroup {
|
45
|
+
int nbShortRange;
|
46
|
+
int nbLongRange;
|
47
|
+
const xmlChSRange *shortRange; /* points to an array of ranges */
|
48
|
+
const xmlChLRange *longRange;
|
49
|
+
};
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Range checking routine
|
53
|
+
*/
|
54
|
+
XMLPUBFUN int
|
55
|
+
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
56
|
+
|
57
|
+
|
58
|
+
/**
|
59
|
+
* xmlIsBaseChar_ch:
|
60
|
+
* @c: char to validate
|
61
|
+
*
|
62
|
+
* Automatically generated by genChRanges.py
|
63
|
+
*/
|
64
|
+
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
65
|
+
((0x61 <= (c)) && ((c) <= 0x7a)) || \
|
66
|
+
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
|
67
|
+
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
|
68
|
+
(0xf8 <= (c)))
|
69
|
+
|
70
|
+
/**
|
71
|
+
* xmlIsBaseCharQ:
|
72
|
+
* @c: char to validate
|
73
|
+
*
|
74
|
+
* Automatically generated by genChRanges.py
|
75
|
+
*/
|
76
|
+
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
|
77
|
+
xmlIsBaseChar_ch((c)) : \
|
78
|
+
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
79
|
+
|
80
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
|
81
|
+
|
82
|
+
/**
|
83
|
+
* xmlIsBlank_ch:
|
84
|
+
* @c: char to validate
|
85
|
+
*
|
86
|
+
* Automatically generated by genChRanges.py
|
87
|
+
*/
|
88
|
+
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
|
89
|
+
((0x9 <= (c)) && ((c) <= 0xa)) || \
|
90
|
+
((c) == 0xd))
|
91
|
+
|
92
|
+
/**
|
93
|
+
* xmlIsBlankQ:
|
94
|
+
* @c: char to validate
|
95
|
+
*
|
96
|
+
* Automatically generated by genChRanges.py
|
97
|
+
*/
|
98
|
+
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
|
99
|
+
xmlIsBlank_ch((c)) : 0)
|
100
|
+
|
101
|
+
|
102
|
+
/**
|
103
|
+
* xmlIsChar_ch:
|
104
|
+
* @c: char to validate
|
105
|
+
*
|
106
|
+
* Automatically generated by genChRanges.py
|
107
|
+
*/
|
108
|
+
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
|
109
|
+
((c) == 0xd) || \
|
110
|
+
(0x20 <= (c)))
|
111
|
+
|
112
|
+
/**
|
113
|
+
* xmlIsCharQ:
|
114
|
+
* @c: char to validate
|
115
|
+
*
|
116
|
+
* Automatically generated by genChRanges.py
|
117
|
+
*/
|
118
|
+
#define xmlIsCharQ(c) (((c) < 0x100) ? \
|
119
|
+
xmlIsChar_ch((c)) :\
|
120
|
+
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
|
121
|
+
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
122
|
+
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
123
|
+
|
124
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* xmlIsCombiningQ:
|
128
|
+
* @c: char to validate
|
129
|
+
*
|
130
|
+
* Automatically generated by genChRanges.py
|
131
|
+
*/
|
132
|
+
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
|
133
|
+
0 : \
|
134
|
+
xmlCharInRange((c), &xmlIsCombiningGroup))
|
135
|
+
|
136
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
|
137
|
+
|
138
|
+
/**
|
139
|
+
* xmlIsDigit_ch:
|
140
|
+
* @c: char to validate
|
141
|
+
*
|
142
|
+
* Automatically generated by genChRanges.py
|
143
|
+
*/
|
144
|
+
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
|
145
|
+
|
146
|
+
/**
|
147
|
+
* xmlIsDigitQ:
|
148
|
+
* @c: char to validate
|
149
|
+
*
|
150
|
+
* Automatically generated by genChRanges.py
|
151
|
+
*/
|
152
|
+
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
|
153
|
+
xmlIsDigit_ch((c)) : \
|
154
|
+
xmlCharInRange((c), &xmlIsDigitGroup))
|
155
|
+
|
156
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* xmlIsExtender_ch:
|
160
|
+
* @c: char to validate
|
161
|
+
*
|
162
|
+
* Automatically generated by genChRanges.py
|
163
|
+
*/
|
164
|
+
#define xmlIsExtender_ch(c) (((c) == 0xb7))
|
165
|
+
|
166
|
+
/**
|
167
|
+
* xmlIsExtenderQ:
|
168
|
+
* @c: char to validate
|
169
|
+
*
|
170
|
+
* Automatically generated by genChRanges.py
|
171
|
+
*/
|
172
|
+
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
|
173
|
+
xmlIsExtender_ch((c)) : \
|
174
|
+
xmlCharInRange((c), &xmlIsExtenderGroup))
|
175
|
+
|
176
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
|
177
|
+
|
178
|
+
/**
|
179
|
+
* xmlIsIdeographicQ:
|
180
|
+
* @c: char to validate
|
181
|
+
*
|
182
|
+
* Automatically generated by genChRanges.py
|
183
|
+
*/
|
184
|
+
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
|
185
|
+
0 :\
|
186
|
+
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
|
187
|
+
((c) == 0x3007) || \
|
188
|
+
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
189
|
+
|
190
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
|
191
|
+
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
192
|
+
|
193
|
+
/**
|
194
|
+
* xmlIsPubidChar_ch:
|
195
|
+
* @c: char to validate
|
196
|
+
*
|
197
|
+
* Automatically generated by genChRanges.py
|
198
|
+
*/
|
199
|
+
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
|
200
|
+
|
201
|
+
/**
|
202
|
+
* xmlIsPubidCharQ:
|
203
|
+
* @c: char to validate
|
204
|
+
*
|
205
|
+
* Automatically generated by genChRanges.py
|
206
|
+
*/
|
207
|
+
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
|
208
|
+
xmlIsPubidChar_ch((c)) : 0)
|
209
|
+
|
210
|
+
XMLPUBFUN int
|
211
|
+
xmlIsBaseChar(unsigned int ch);
|
212
|
+
XMLPUBFUN int
|
213
|
+
xmlIsBlank(unsigned int ch);
|
214
|
+
XMLPUBFUN int
|
215
|
+
xmlIsChar(unsigned int ch);
|
216
|
+
XMLPUBFUN int
|
217
|
+
xmlIsCombining(unsigned int ch);
|
218
|
+
XMLPUBFUN int
|
219
|
+
xmlIsDigit(unsigned int ch);
|
220
|
+
XMLPUBFUN int
|
221
|
+
xmlIsExtender(unsigned int ch);
|
222
|
+
XMLPUBFUN int
|
223
|
+
xmlIsIdeographic(unsigned int ch);
|
224
|
+
XMLPUBFUN int
|
225
|
+
xmlIsPubidChar(unsigned int ch);
|
226
|
+
|
227
|
+
#ifdef __cplusplus
|
228
|
+
}
|
229
|
+
#endif
|
230
|
+
#endif /* __XML_CHVALID_H__ */
|
@@ -0,0 +1,217 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Tree debugging APIs
|
3
|
+
* Description: Interfaces to a set of routines used for debugging the tree
|
4
|
+
* produced by the XML parser.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __DEBUG_XML__
|
12
|
+
#define __DEBUG_XML__
|
13
|
+
#include <stdio.h>
|
14
|
+
#include <libxml/xmlversion.h>
|
15
|
+
#include <libxml/tree.h>
|
16
|
+
|
17
|
+
#ifdef LIBXML_DEBUG_ENABLED
|
18
|
+
|
19
|
+
#include <libxml/xpath.h>
|
20
|
+
|
21
|
+
#ifdef __cplusplus
|
22
|
+
extern "C" {
|
23
|
+
#endif
|
24
|
+
|
25
|
+
/*
|
26
|
+
* The standard Dump routines.
|
27
|
+
*/
|
28
|
+
XMLPUBFUN void
|
29
|
+
xmlDebugDumpString (FILE *output,
|
30
|
+
const xmlChar *str);
|
31
|
+
XMLPUBFUN void
|
32
|
+
xmlDebugDumpAttr (FILE *output,
|
33
|
+
xmlAttrPtr attr,
|
34
|
+
int depth);
|
35
|
+
XMLPUBFUN void
|
36
|
+
xmlDebugDumpAttrList (FILE *output,
|
37
|
+
xmlAttrPtr attr,
|
38
|
+
int depth);
|
39
|
+
XMLPUBFUN void
|
40
|
+
xmlDebugDumpOneNode (FILE *output,
|
41
|
+
xmlNodePtr node,
|
42
|
+
int depth);
|
43
|
+
XMLPUBFUN void
|
44
|
+
xmlDebugDumpNode (FILE *output,
|
45
|
+
xmlNodePtr node,
|
46
|
+
int depth);
|
47
|
+
XMLPUBFUN void
|
48
|
+
xmlDebugDumpNodeList (FILE *output,
|
49
|
+
xmlNodePtr node,
|
50
|
+
int depth);
|
51
|
+
XMLPUBFUN void
|
52
|
+
xmlDebugDumpDocumentHead(FILE *output,
|
53
|
+
xmlDocPtr doc);
|
54
|
+
XMLPUBFUN void
|
55
|
+
xmlDebugDumpDocument (FILE *output,
|
56
|
+
xmlDocPtr doc);
|
57
|
+
XMLPUBFUN void
|
58
|
+
xmlDebugDumpDTD (FILE *output,
|
59
|
+
xmlDtdPtr dtd);
|
60
|
+
XMLPUBFUN void
|
61
|
+
xmlDebugDumpEntities (FILE *output,
|
62
|
+
xmlDocPtr doc);
|
63
|
+
|
64
|
+
/****************************************************************
|
65
|
+
* *
|
66
|
+
* Checking routines *
|
67
|
+
* *
|
68
|
+
****************************************************************/
|
69
|
+
|
70
|
+
XMLPUBFUN int
|
71
|
+
xmlDebugCheckDocument (FILE * output,
|
72
|
+
xmlDocPtr doc);
|
73
|
+
|
74
|
+
/****************************************************************
|
75
|
+
* *
|
76
|
+
* XML shell helpers *
|
77
|
+
* *
|
78
|
+
****************************************************************/
|
79
|
+
|
80
|
+
XMLPUBFUN void
|
81
|
+
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
82
|
+
XMLPUBFUN int
|
83
|
+
xmlLsCountNode (xmlNodePtr node);
|
84
|
+
|
85
|
+
XMLPUBFUN const char *
|
86
|
+
xmlBoolToText (int boolval);
|
87
|
+
|
88
|
+
/****************************************************************
|
89
|
+
* *
|
90
|
+
* The XML shell related structures and functions *
|
91
|
+
* *
|
92
|
+
****************************************************************/
|
93
|
+
|
94
|
+
#ifdef LIBXML_XPATH_ENABLED
|
95
|
+
/**
|
96
|
+
* xmlShellReadlineFunc:
|
97
|
+
* @prompt: a string prompt
|
98
|
+
*
|
99
|
+
* This is a generic signature for the XML shell input function.
|
100
|
+
*
|
101
|
+
* Returns a string which will be freed by the Shell.
|
102
|
+
*/
|
103
|
+
typedef char * (* xmlShellReadlineFunc)(char *prompt);
|
104
|
+
|
105
|
+
/**
|
106
|
+
* xmlShellCtxt:
|
107
|
+
*
|
108
|
+
* A debugging shell context.
|
109
|
+
* TODO: add the defined function tables.
|
110
|
+
*/
|
111
|
+
typedef struct _xmlShellCtxt xmlShellCtxt;
|
112
|
+
typedef xmlShellCtxt *xmlShellCtxtPtr;
|
113
|
+
struct _xmlShellCtxt {
|
114
|
+
char *filename;
|
115
|
+
xmlDocPtr doc;
|
116
|
+
xmlNodePtr node;
|
117
|
+
xmlXPathContextPtr pctxt;
|
118
|
+
int loaded;
|
119
|
+
FILE *output;
|
120
|
+
xmlShellReadlineFunc input;
|
121
|
+
};
|
122
|
+
|
123
|
+
/**
|
124
|
+
* xmlShellCmd:
|
125
|
+
* @ctxt: a shell context
|
126
|
+
* @arg: a string argument
|
127
|
+
* @node: a first node
|
128
|
+
* @node2: a second node
|
129
|
+
*
|
130
|
+
* This is a generic signature for the XML shell functions.
|
131
|
+
*
|
132
|
+
* Returns an int, negative returns indicating errors.
|
133
|
+
*/
|
134
|
+
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
135
|
+
char *arg,
|
136
|
+
xmlNodePtr node,
|
137
|
+
xmlNodePtr node2);
|
138
|
+
|
139
|
+
XMLPUBFUN void
|
140
|
+
xmlShellPrintXPathError (int errorType,
|
141
|
+
const char *arg);
|
142
|
+
XMLPUBFUN void
|
143
|
+
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
144
|
+
XMLPUBFUN int
|
145
|
+
xmlShellList (xmlShellCtxtPtr ctxt,
|
146
|
+
char *arg,
|
147
|
+
xmlNodePtr node,
|
148
|
+
xmlNodePtr node2);
|
149
|
+
XMLPUBFUN int
|
150
|
+
xmlShellBase (xmlShellCtxtPtr ctxt,
|
151
|
+
char *arg,
|
152
|
+
xmlNodePtr node,
|
153
|
+
xmlNodePtr node2);
|
154
|
+
XMLPUBFUN int
|
155
|
+
xmlShellDir (xmlShellCtxtPtr ctxt,
|
156
|
+
char *arg,
|
157
|
+
xmlNodePtr node,
|
158
|
+
xmlNodePtr node2);
|
159
|
+
XMLPUBFUN int
|
160
|
+
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
161
|
+
char *filename,
|
162
|
+
xmlNodePtr node,
|
163
|
+
xmlNodePtr node2);
|
164
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
165
|
+
XMLPUBFUN void
|
166
|
+
xmlShellPrintNode (xmlNodePtr node);
|
167
|
+
XMLPUBFUN int
|
168
|
+
xmlShellCat (xmlShellCtxtPtr ctxt,
|
169
|
+
char *arg,
|
170
|
+
xmlNodePtr node,
|
171
|
+
xmlNodePtr node2);
|
172
|
+
XMLPUBFUN int
|
173
|
+
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
174
|
+
char *filename,
|
175
|
+
xmlNodePtr node,
|
176
|
+
xmlNodePtr node2);
|
177
|
+
XMLPUBFUN int
|
178
|
+
xmlShellSave (xmlShellCtxtPtr ctxt,
|
179
|
+
char *filename,
|
180
|
+
xmlNodePtr node,
|
181
|
+
xmlNodePtr node2);
|
182
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
183
|
+
#ifdef LIBXML_VALID_ENABLED
|
184
|
+
XMLPUBFUN int
|
185
|
+
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
186
|
+
char *dtd,
|
187
|
+
xmlNodePtr node,
|
188
|
+
xmlNodePtr node2);
|
189
|
+
#endif /* LIBXML_VALID_ENABLED */
|
190
|
+
XMLPUBFUN int
|
191
|
+
xmlShellDu (xmlShellCtxtPtr ctxt,
|
192
|
+
char *arg,
|
193
|
+
xmlNodePtr tree,
|
194
|
+
xmlNodePtr node2);
|
195
|
+
XMLPUBFUN int
|
196
|
+
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
197
|
+
char *buffer,
|
198
|
+
xmlNodePtr node,
|
199
|
+
xmlNodePtr node2);
|
200
|
+
|
201
|
+
/*
|
202
|
+
* The Shell interface.
|
203
|
+
*/
|
204
|
+
XMLPUBFUN void
|
205
|
+
xmlShell (xmlDocPtr doc,
|
206
|
+
const char *filename,
|
207
|
+
xmlShellReadlineFunc input,
|
208
|
+
FILE *output);
|
209
|
+
|
210
|
+
#endif /* LIBXML_XPATH_ENABLED */
|
211
|
+
|
212
|
+
#ifdef __cplusplus
|
213
|
+
}
|
214
|
+
#endif
|
215
|
+
|
216
|
+
#endif /* LIBXML_DEBUG_ENABLED */
|
217
|
+
#endif /* __DEBUG_XML__ */
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: string dictionary
|
3
|
+
* Description: dictionary of reusable strings, just used to avoid allocation
|
4
|
+
* and freeing operations.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_DICT_H__
|
12
|
+
#define __XML_DICT_H__
|
13
|
+
|
14
|
+
#include <stddef.h>
|
15
|
+
#include <libxml/xmlversion.h>
|
16
|
+
#include <libxml/xmlstring.h>
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/*
|
23
|
+
* The dictionary.
|
24
|
+
*/
|
25
|
+
typedef struct _xmlDict xmlDict;
|
26
|
+
typedef xmlDict *xmlDictPtr;
|
27
|
+
|
28
|
+
/*
|
29
|
+
* Initializer
|
30
|
+
*/
|
31
|
+
XML_DEPRECATED
|
32
|
+
XMLPUBFUN int xmlInitializeDict(void);
|
33
|
+
|
34
|
+
/*
|
35
|
+
* Constructor and destructor.
|
36
|
+
*/
|
37
|
+
XMLPUBFUN xmlDictPtr
|
38
|
+
xmlDictCreate (void);
|
39
|
+
XMLPUBFUN size_t
|
40
|
+
xmlDictSetLimit (xmlDictPtr dict,
|
41
|
+
size_t limit);
|
42
|
+
XMLPUBFUN size_t
|
43
|
+
xmlDictGetUsage (xmlDictPtr dict);
|
44
|
+
XMLPUBFUN xmlDictPtr
|
45
|
+
xmlDictCreateSub(xmlDictPtr sub);
|
46
|
+
XMLPUBFUN int
|
47
|
+
xmlDictReference(xmlDictPtr dict);
|
48
|
+
XMLPUBFUN void
|
49
|
+
xmlDictFree (xmlDictPtr dict);
|
50
|
+
|
51
|
+
/*
|
52
|
+
* Lookup of entry in the dictionary.
|
53
|
+
*/
|
54
|
+
XMLPUBFUN const xmlChar *
|
55
|
+
xmlDictLookup (xmlDictPtr dict,
|
56
|
+
const xmlChar *name,
|
57
|
+
int len);
|
58
|
+
XMLPUBFUN const xmlChar *
|
59
|
+
xmlDictExists (xmlDictPtr dict,
|
60
|
+
const xmlChar *name,
|
61
|
+
int len);
|
62
|
+
XMLPUBFUN const xmlChar *
|
63
|
+
xmlDictQLookup (xmlDictPtr dict,
|
64
|
+
const xmlChar *prefix,
|
65
|
+
const xmlChar *name);
|
66
|
+
XMLPUBFUN int
|
67
|
+
xmlDictOwns (xmlDictPtr dict,
|
68
|
+
const xmlChar *str);
|
69
|
+
XMLPUBFUN int
|
70
|
+
xmlDictSize (xmlDictPtr dict);
|
71
|
+
|
72
|
+
/*
|
73
|
+
* Cleanup function
|
74
|
+
*/
|
75
|
+
XML_DEPRECATED
|
76
|
+
XMLPUBFUN void
|
77
|
+
xmlDictCleanup (void);
|
78
|
+
|
79
|
+
#ifdef __cplusplus
|
80
|
+
}
|
81
|
+
#endif
|
82
|
+
#endif /* ! __XML_DICT_H__ */
|