nokogiri 1.10.10 → 1.14.3-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +44 -0
- data/LICENSE-DEPENDENCIES.md +1632 -1022
- data/LICENSE.md +1 -1
- data/README.md +185 -96
- data/bin/nokogiri +63 -50
- data/dependencies.yml +33 -66
- data/ext/nokogiri/depend +38 -358
- data/ext/nokogiri/extconf.rb +819 -421
- data/ext/nokogiri/gumbo.c +594 -0
- data/ext/nokogiri/html4_document.c +166 -0
- data/ext/nokogiri/html4_element_description.c +294 -0
- data/ext/nokogiri/html4_entity_lookup.c +37 -0
- data/ext/nokogiri/html4_sax_parser_context.c +114 -0
- data/ext/nokogiri/html4_sax_push_parser.c +95 -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 +306 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX.h +204 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX2.h +172 -0
- data/ext/nokogiri/include/libxml2/libxml/c14n.h +128 -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 +81 -0
- data/ext/nokogiri/include/libxml2/libxml/encoding.h +232 -0
- data/ext/nokogiri/include/libxml2/libxml/entities.h +153 -0
- data/ext/nokogiri/include/libxml2/libxml/globals.h +499 -0
- data/ext/nokogiri/include/libxml2/libxml/hash.h +236 -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 +81 -0
- data/ext/nokogiri/include/libxml2/libxml/parser.h +1244 -0
- data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +656 -0
- data/ext/nokogiri/include/libxml2/libxml/pattern.h +100 -0
- data/ext/nokogiri/include/libxml2/libxml/relaxng.h +218 -0
- data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +958 -0
- data/ext/nokogiri/include/libxml2/libxml/schematron.h +142 -0
- data/ext/nokogiri/include/libxml2/libxml/threads.h +91 -0
- data/ext/nokogiri/include/libxml2/libxml/tree.h +1312 -0
- data/ext/nokogiri/include/libxml2/libxml/uri.h +94 -0
- data/ext/nokogiri/include/libxml2/libxml/valid.h +463 -0
- data/ext/nokogiri/include/libxml2/libxml/xinclude.h +129 -0
- data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +368 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +947 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +77 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +226 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +428 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +222 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +88 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +246 -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 +202 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +503 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +488 -0
- data/ext/nokogiri/include/libxml2/libxml/xpath.h +575 -0
- data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +632 -0
- data/ext/nokogiri/include/libxml2/libxml/xpointer.h +137 -0
- data/ext/nokogiri/include/libxslt/attributes.h +38 -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 +1982 -0
- data/ext/nokogiri/include/libxslt/xsltconfig.h +179 -0
- data/ext/nokogiri/include/libxslt/xsltexports.h +64 -0
- data/ext/nokogiri/include/libxslt/xsltlocale.h +76 -0
- data/ext/nokogiri/include/libxslt/xsltutils.h +310 -0
- data/ext/nokogiri/libxml2_backwards_compat.c +121 -0
- data/ext/nokogiri/nokogiri.c +228 -104
- data/ext/nokogiri/nokogiri.h +204 -90
- data/ext/nokogiri/test_global_handlers.c +40 -0
- data/ext/nokogiri/xml_attr.c +17 -17
- data/ext/nokogiri/xml_attribute_decl.c +22 -22
- data/ext/nokogiri/xml_cdata.c +15 -20
- data/ext/nokogiri/xml_comment.c +19 -26
- data/ext/nokogiri/xml_document.c +306 -225
- data/ext/nokogiri/xml_document_fragment.c +12 -16
- data/ext/nokogiri/xml_dtd.c +64 -58
- data/ext/nokogiri/xml_element_content.c +33 -28
- data/ext/nokogiri/xml_element_decl.c +26 -26
- data/ext/nokogiri/xml_encoding_handler.c +45 -20
- data/ext/nokogiri/xml_entity_decl.c +37 -35
- data/ext/nokogiri/xml_entity_reference.c +16 -18
- data/ext/nokogiri/xml_namespace.c +136 -61
- data/ext/nokogiri/xml_node.c +1344 -672
- data/ext/nokogiri/xml_node_set.c +178 -168
- data/ext/nokogiri/xml_processing_instruction.c +17 -19
- data/ext/nokogiri/xml_reader.c +316 -190
- data/ext/nokogiri/xml_relax_ng.c +52 -30
- data/ext/nokogiri/xml_sax_parser.c +130 -124
- data/ext/nokogiri/xml_sax_parser_context.c +110 -89
- data/ext/nokogiri/xml_sax_push_parser.c +36 -29
- data/ext/nokogiri/xml_schema.c +98 -50
- data/ext/nokogiri/xml_syntax_error.c +42 -21
- data/ext/nokogiri/xml_text.c +14 -18
- data/ext/nokogiri/xml_xpath_context.c +263 -148
- data/ext/nokogiri/xslt_stylesheet.c +271 -178
- data/gumbo-parser/CHANGES.md +63 -0
- data/gumbo-parser/Makefile +111 -0
- data/gumbo-parser/THANKS +27 -0
- data/lib/nokogiri/2.7/nokogiri.so +0 -0
- data/lib/nokogiri/3.0/nokogiri.so +0 -0
- data/lib/nokogiri/3.1/nokogiri.so +0 -0
- data/lib/nokogiri/3.2/nokogiri.so +0 -0
- data/lib/nokogiri/class_resolver.rb +67 -0
- data/lib/nokogiri/css/node.rb +10 -8
- data/lib/nokogiri/css/parser.rb +397 -377
- data/lib/nokogiri/css/parser.y +250 -245
- data/lib/nokogiri/css/parser_extras.rb +54 -49
- data/lib/nokogiri/css/syntax_error.rb +3 -1
- data/lib/nokogiri/css/tokenizer.rb +5 -3
- data/lib/nokogiri/css/tokenizer.rex +3 -2
- data/lib/nokogiri/css/xpath_visitor.rb +223 -94
- data/lib/nokogiri/css.rb +56 -17
- data/lib/nokogiri/decorators/slop.rb +9 -7
- 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 +38 -27
- data/lib/nokogiri/{html → html4}/builder.rb +4 -2
- data/lib/nokogiri/html4/document.rb +214 -0
- data/lib/nokogiri/html4/document_fragment.rb +54 -0
- data/lib/nokogiri/{html → html4}/element_description.rb +3 -1
- data/lib/nokogiri/html4/element_description_defaults.rb +572 -0
- data/lib/nokogiri/html4/encoding_reader.rb +121 -0
- data/lib/nokogiri/{html → html4}/entity_lookup.rb +4 -2
- data/lib/nokogiri/{html → html4}/sax/parser.rb +17 -16
- data/lib/nokogiri/html4/sax/parser_context.rb +20 -0
- data/lib/nokogiri/{html → html4}/sax/push_parser.rb +12 -11
- data/lib/nokogiri/html4.rb +47 -0
- data/lib/nokogiri/html5/document.rb +168 -0
- data/lib/nokogiri/html5/document_fragment.rb +90 -0
- data/lib/nokogiri/html5/node.rb +98 -0
- data/lib/nokogiri/html5.rb +389 -0
- data/lib/nokogiri/jruby/dependencies.rb +3 -0
- data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
- data/lib/nokogiri/syntax_error.rb +2 -0
- data/lib/nokogiri/version/constant.rb +6 -0
- data/lib/nokogiri/version/info.rb +223 -0
- data/lib/nokogiri/version.rb +3 -108
- data/lib/nokogiri/xml/attr.rb +55 -3
- data/lib/nokogiri/xml/attribute_decl.rb +3 -1
- data/lib/nokogiri/xml/builder.rb +75 -34
- data/lib/nokogiri/xml/cdata.rb +3 -1
- data/lib/nokogiri/xml/character_data.rb +2 -0
- data/lib/nokogiri/xml/document.rb +312 -126
- data/lib/nokogiri/xml/document_fragment.rb +93 -48
- data/lib/nokogiri/xml/dtd.rb +4 -2
- data/lib/nokogiri/xml/element_content.rb +2 -0
- data/lib/nokogiri/xml/element_decl.rb +3 -1
- data/lib/nokogiri/xml/entity_decl.rb +4 -2
- data/lib/nokogiri/xml/entity_reference.rb +2 -0
- data/lib/nokogiri/xml/namespace.rb +45 -0
- data/lib/nokogiri/xml/node/save_options.rb +15 -8
- data/lib/nokogiri/xml/node.rb +1067 -406
- data/lib/nokogiri/xml/node_set.rb +135 -59
- data/lib/nokogiri/xml/notation.rb +13 -0
- data/lib/nokogiri/xml/parse_options.rb +145 -52
- data/lib/nokogiri/xml/pp/character_data.rb +9 -6
- data/lib/nokogiri/xml/pp/node.rb +27 -26
- data/lib/nokogiri/xml/pp.rb +4 -2
- data/lib/nokogiri/xml/processing_instruction.rb +4 -1
- data/lib/nokogiri/xml/reader.rb +21 -28
- data/lib/nokogiri/xml/relax_ng.rb +8 -2
- data/lib/nokogiri/xml/sax/document.rb +45 -49
- data/lib/nokogiri/xml/sax/parser.rb +39 -36
- data/lib/nokogiri/xml/sax/parser_context.rb +8 -3
- data/lib/nokogiri/xml/sax/push_parser.rb +6 -5
- data/lib/nokogiri/xml/sax.rb +6 -4
- data/lib/nokogiri/xml/schema.rb +19 -9
- data/lib/nokogiri/xml/searchable.rb +112 -72
- data/lib/nokogiri/xml/syntax_error.rb +6 -4
- data/lib/nokogiri/xml/text.rb +2 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +4 -2
- data/lib/nokogiri/xml/xpath.rb +15 -4
- data/lib/nokogiri/xml/xpath_context.rb +3 -3
- data/lib/nokogiri/xml.rb +38 -37
- data/lib/nokogiri/xslt/stylesheet.rb +3 -1
- data/lib/nokogiri/xslt.rb +29 -20
- data/lib/nokogiri.rb +48 -72
- data/lib/xsd/xmlparser/nokogiri.rb +29 -25
- metadata +146 -307
- data/ext/nokogiri/html_document.c +0 -170
- data/ext/nokogiri/html_document.h +0 -10
- data/ext/nokogiri/html_element_description.c +0 -279
- data/ext/nokogiri/html_element_description.h +0 -10
- data/ext/nokogiri/html_entity_lookup.c +0 -32
- data/ext/nokogiri/html_entity_lookup.h +0 -8
- data/ext/nokogiri/html_sax_parser_context.c +0 -116
- data/ext/nokogiri/html_sax_parser_context.h +0 -11
- data/ext/nokogiri/html_sax_push_parser.c +0 -87
- data/ext/nokogiri/html_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_attr.h +0 -9
- data/ext/nokogiri/xml_attribute_decl.h +0 -9
- data/ext/nokogiri/xml_cdata.h +0 -9
- data/ext/nokogiri/xml_comment.h +0 -9
- data/ext/nokogiri/xml_document.h +0 -23
- data/ext/nokogiri/xml_document_fragment.h +0 -10
- data/ext/nokogiri/xml_dtd.h +0 -10
- data/ext/nokogiri/xml_element_content.h +0 -10
- data/ext/nokogiri/xml_element_decl.h +0 -9
- data/ext/nokogiri/xml_encoding_handler.h +0 -8
- data/ext/nokogiri/xml_entity_decl.h +0 -10
- data/ext/nokogiri/xml_entity_reference.h +0 -9
- data/ext/nokogiri/xml_io.c +0 -61
- data/ext/nokogiri/xml_io.h +0 -11
- data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
- data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
- data/ext/nokogiri/xml_namespace.h +0 -14
- data/ext/nokogiri/xml_node.h +0 -13
- data/ext/nokogiri/xml_node_set.h +0 -12
- data/ext/nokogiri/xml_processing_instruction.h +0 -9
- data/ext/nokogiri/xml_reader.h +0 -10
- data/ext/nokogiri/xml_relax_ng.h +0 -9
- data/ext/nokogiri/xml_sax_parser.h +0 -39
- data/ext/nokogiri/xml_sax_parser_context.h +0 -10
- data/ext/nokogiri/xml_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_schema.h +0 -9
- data/ext/nokogiri/xml_syntax_error.h +0 -13
- data/ext/nokogiri/xml_text.h +0 -9
- data/ext/nokogiri/xml_xpath_context.h +0 -10
- data/ext/nokogiri/xslt_stylesheet.h +0 -14
- data/lib/nokogiri/html/document.rb +0 -335
- data/lib/nokogiri/html/document_fragment.rb +0 -49
- data/lib/nokogiri/html/element_description_defaults.rb +0 -671
- data/lib/nokogiri/html/sax/parser_context.rb +0 -16
- data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +0 -78
- data/patches/libxml2/0002-Remove-script-macro-support.patch +0 -40
- data/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +0 -44
- data/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch +0 -25
- data/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +0 -32
- data/ports/archives/libxml2-2.9.10.tar.gz +0 -0
- data/ports/archives/libxslt-1.1.34.tar.gz +0 -0
@@ -0,0 +1,428 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: the XMLReader implementation
|
3
|
+
* Description: API of the XML streaming API based on C# interfaces.
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XMLREADER_H__
|
11
|
+
#define __XML_XMLREADER_H__
|
12
|
+
|
13
|
+
#include <libxml/xmlversion.h>
|
14
|
+
#include <libxml/tree.h>
|
15
|
+
#include <libxml/xmlIO.h>
|
16
|
+
#ifdef LIBXML_SCHEMAS_ENABLED
|
17
|
+
#include <libxml/relaxng.h>
|
18
|
+
#include <libxml/xmlschemas.h>
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#ifdef __cplusplus
|
22
|
+
extern "C" {
|
23
|
+
#endif
|
24
|
+
|
25
|
+
/**
|
26
|
+
* xmlParserSeverities:
|
27
|
+
*
|
28
|
+
* How severe an error callback is when the per-reader error callback API
|
29
|
+
* is used.
|
30
|
+
*/
|
31
|
+
typedef enum {
|
32
|
+
XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
|
33
|
+
XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
|
34
|
+
XML_PARSER_SEVERITY_WARNING = 3,
|
35
|
+
XML_PARSER_SEVERITY_ERROR = 4
|
36
|
+
} xmlParserSeverities;
|
37
|
+
|
38
|
+
#ifdef LIBXML_READER_ENABLED
|
39
|
+
|
40
|
+
/**
|
41
|
+
* xmlTextReaderMode:
|
42
|
+
*
|
43
|
+
* Internal state values for the reader.
|
44
|
+
*/
|
45
|
+
typedef enum {
|
46
|
+
XML_TEXTREADER_MODE_INITIAL = 0,
|
47
|
+
XML_TEXTREADER_MODE_INTERACTIVE = 1,
|
48
|
+
XML_TEXTREADER_MODE_ERROR = 2,
|
49
|
+
XML_TEXTREADER_MODE_EOF =3,
|
50
|
+
XML_TEXTREADER_MODE_CLOSED = 4,
|
51
|
+
XML_TEXTREADER_MODE_READING = 5
|
52
|
+
} xmlTextReaderMode;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* xmlParserProperties:
|
56
|
+
*
|
57
|
+
* Some common options to use with xmlTextReaderSetParserProp, but it
|
58
|
+
* is better to use xmlParserOption and the xmlReaderNewxxx and
|
59
|
+
* xmlReaderForxxx APIs now.
|
60
|
+
*/
|
61
|
+
typedef enum {
|
62
|
+
XML_PARSER_LOADDTD = 1,
|
63
|
+
XML_PARSER_DEFAULTATTRS = 2,
|
64
|
+
XML_PARSER_VALIDATE = 3,
|
65
|
+
XML_PARSER_SUBST_ENTITIES = 4
|
66
|
+
} xmlParserProperties;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* xmlReaderTypes:
|
70
|
+
*
|
71
|
+
* Predefined constants for the different types of nodes.
|
72
|
+
*/
|
73
|
+
typedef enum {
|
74
|
+
XML_READER_TYPE_NONE = 0,
|
75
|
+
XML_READER_TYPE_ELEMENT = 1,
|
76
|
+
XML_READER_TYPE_ATTRIBUTE = 2,
|
77
|
+
XML_READER_TYPE_TEXT = 3,
|
78
|
+
XML_READER_TYPE_CDATA = 4,
|
79
|
+
XML_READER_TYPE_ENTITY_REFERENCE = 5,
|
80
|
+
XML_READER_TYPE_ENTITY = 6,
|
81
|
+
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
|
82
|
+
XML_READER_TYPE_COMMENT = 8,
|
83
|
+
XML_READER_TYPE_DOCUMENT = 9,
|
84
|
+
XML_READER_TYPE_DOCUMENT_TYPE = 10,
|
85
|
+
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
|
86
|
+
XML_READER_TYPE_NOTATION = 12,
|
87
|
+
XML_READER_TYPE_WHITESPACE = 13,
|
88
|
+
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
|
89
|
+
XML_READER_TYPE_END_ELEMENT = 15,
|
90
|
+
XML_READER_TYPE_END_ENTITY = 16,
|
91
|
+
XML_READER_TYPE_XML_DECLARATION = 17
|
92
|
+
} xmlReaderTypes;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* xmlTextReader:
|
96
|
+
*
|
97
|
+
* Structure for an xmlReader context.
|
98
|
+
*/
|
99
|
+
typedef struct _xmlTextReader xmlTextReader;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* xmlTextReaderPtr:
|
103
|
+
*
|
104
|
+
* Pointer to an xmlReader context.
|
105
|
+
*/
|
106
|
+
typedef xmlTextReader *xmlTextReaderPtr;
|
107
|
+
|
108
|
+
/*
|
109
|
+
* Constructors & Destructor
|
110
|
+
*/
|
111
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
112
|
+
xmlNewTextReader (xmlParserInputBufferPtr input,
|
113
|
+
const char *URI);
|
114
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
115
|
+
xmlNewTextReaderFilename(const char *URI);
|
116
|
+
|
117
|
+
XMLPUBFUN void XMLCALL
|
118
|
+
xmlFreeTextReader (xmlTextReaderPtr reader);
|
119
|
+
|
120
|
+
XMLPUBFUN int XMLCALL
|
121
|
+
xmlTextReaderSetup(xmlTextReaderPtr reader,
|
122
|
+
xmlParserInputBufferPtr input, const char *URL,
|
123
|
+
const char *encoding, int options);
|
124
|
+
|
125
|
+
/*
|
126
|
+
* Iterators
|
127
|
+
*/
|
128
|
+
XMLPUBFUN int XMLCALL
|
129
|
+
xmlTextReaderRead (xmlTextReaderPtr reader);
|
130
|
+
|
131
|
+
#ifdef LIBXML_WRITER_ENABLED
|
132
|
+
XMLPUBFUN xmlChar * XMLCALL
|
133
|
+
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
|
134
|
+
|
135
|
+
XMLPUBFUN xmlChar * XMLCALL
|
136
|
+
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
|
137
|
+
#endif
|
138
|
+
|
139
|
+
XMLPUBFUN xmlChar * XMLCALL
|
140
|
+
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
141
|
+
XMLPUBFUN int XMLCALL
|
142
|
+
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
|
143
|
+
|
144
|
+
/*
|
145
|
+
* Attributes of the node
|
146
|
+
*/
|
147
|
+
XMLPUBFUN int XMLCALL
|
148
|
+
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
|
149
|
+
XMLPUBFUN int XMLCALL
|
150
|
+
xmlTextReaderDepth (xmlTextReaderPtr reader);
|
151
|
+
XMLPUBFUN int XMLCALL
|
152
|
+
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
|
153
|
+
XMLPUBFUN int XMLCALL
|
154
|
+
xmlTextReaderHasValue(xmlTextReaderPtr reader);
|
155
|
+
XMLPUBFUN int XMLCALL
|
156
|
+
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
|
157
|
+
XMLPUBFUN int XMLCALL
|
158
|
+
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
|
159
|
+
XMLPUBFUN int XMLCALL
|
160
|
+
xmlTextReaderNodeType (xmlTextReaderPtr reader);
|
161
|
+
XMLPUBFUN int XMLCALL
|
162
|
+
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
|
163
|
+
XMLPUBFUN int XMLCALL
|
164
|
+
xmlTextReaderReadState (xmlTextReaderPtr reader);
|
165
|
+
XMLPUBFUN int XMLCALL
|
166
|
+
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
|
167
|
+
|
168
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
169
|
+
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
|
170
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
171
|
+
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
|
172
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
173
|
+
xmlTextReaderConstName (xmlTextReaderPtr reader);
|
174
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
175
|
+
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
|
176
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
177
|
+
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
|
178
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
179
|
+
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
|
180
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
181
|
+
xmlTextReaderConstString (xmlTextReaderPtr reader,
|
182
|
+
const xmlChar *str);
|
183
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
184
|
+
xmlTextReaderConstValue (xmlTextReaderPtr reader);
|
185
|
+
|
186
|
+
/*
|
187
|
+
* use the Const version of the routine for
|
188
|
+
* better performance and simpler code
|
189
|
+
*/
|
190
|
+
XMLPUBFUN xmlChar * XMLCALL
|
191
|
+
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
|
192
|
+
XMLPUBFUN xmlChar * XMLCALL
|
193
|
+
xmlTextReaderLocalName (xmlTextReaderPtr reader);
|
194
|
+
XMLPUBFUN xmlChar * XMLCALL
|
195
|
+
xmlTextReaderName (xmlTextReaderPtr reader);
|
196
|
+
XMLPUBFUN xmlChar * XMLCALL
|
197
|
+
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
|
198
|
+
XMLPUBFUN xmlChar * XMLCALL
|
199
|
+
xmlTextReaderPrefix (xmlTextReaderPtr reader);
|
200
|
+
XMLPUBFUN xmlChar * XMLCALL
|
201
|
+
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
|
202
|
+
XMLPUBFUN xmlChar * XMLCALL
|
203
|
+
xmlTextReaderValue (xmlTextReaderPtr reader);
|
204
|
+
|
205
|
+
/*
|
206
|
+
* Methods of the XmlTextReader
|
207
|
+
*/
|
208
|
+
XMLPUBFUN int XMLCALL
|
209
|
+
xmlTextReaderClose (xmlTextReaderPtr reader);
|
210
|
+
XMLPUBFUN xmlChar * XMLCALL
|
211
|
+
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
|
212
|
+
int no);
|
213
|
+
XMLPUBFUN xmlChar * XMLCALL
|
214
|
+
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
|
215
|
+
const xmlChar *name);
|
216
|
+
XMLPUBFUN xmlChar * XMLCALL
|
217
|
+
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
|
218
|
+
const xmlChar *localName,
|
219
|
+
const xmlChar *namespaceURI);
|
220
|
+
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
221
|
+
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
|
222
|
+
XMLPUBFUN xmlChar * XMLCALL
|
223
|
+
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
|
224
|
+
const xmlChar *prefix);
|
225
|
+
XMLPUBFUN int XMLCALL
|
226
|
+
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
|
227
|
+
int no);
|
228
|
+
XMLPUBFUN int XMLCALL
|
229
|
+
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
|
230
|
+
const xmlChar *name);
|
231
|
+
XMLPUBFUN int XMLCALL
|
232
|
+
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
|
233
|
+
const xmlChar *localName,
|
234
|
+
const xmlChar *namespaceURI);
|
235
|
+
XMLPUBFUN int XMLCALL
|
236
|
+
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
|
237
|
+
XMLPUBFUN int XMLCALL
|
238
|
+
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
|
239
|
+
XMLPUBFUN int XMLCALL
|
240
|
+
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
|
241
|
+
XMLPUBFUN int XMLCALL
|
242
|
+
xmlTextReaderNormalization (xmlTextReaderPtr reader);
|
243
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
244
|
+
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
|
245
|
+
|
246
|
+
/*
|
247
|
+
* Extensions
|
248
|
+
*/
|
249
|
+
XMLPUBFUN int XMLCALL
|
250
|
+
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
|
251
|
+
int prop,
|
252
|
+
int value);
|
253
|
+
XMLPUBFUN int XMLCALL
|
254
|
+
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
|
255
|
+
int prop);
|
256
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
257
|
+
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
|
258
|
+
|
259
|
+
XMLPUBFUN int XMLCALL
|
260
|
+
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
261
|
+
|
262
|
+
XMLPUBFUN int XMLCALL
|
263
|
+
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
264
|
+
|
265
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
266
|
+
xmlTextReaderPreserve (xmlTextReaderPtr reader);
|
267
|
+
#ifdef LIBXML_PATTERN_ENABLED
|
268
|
+
XMLPUBFUN int XMLCALL
|
269
|
+
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
|
270
|
+
const xmlChar *pattern,
|
271
|
+
const xmlChar **namespaces);
|
272
|
+
#endif /* LIBXML_PATTERN_ENABLED */
|
273
|
+
XMLPUBFUN xmlDocPtr XMLCALL
|
274
|
+
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
|
275
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
276
|
+
xmlTextReaderExpand (xmlTextReaderPtr reader);
|
277
|
+
XMLPUBFUN int XMLCALL
|
278
|
+
xmlTextReaderNext (xmlTextReaderPtr reader);
|
279
|
+
XMLPUBFUN int XMLCALL
|
280
|
+
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
281
|
+
XMLPUBFUN int XMLCALL
|
282
|
+
xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
283
|
+
#ifdef LIBXML_SCHEMAS_ENABLED
|
284
|
+
XMLPUBFUN int XMLCALL
|
285
|
+
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
286
|
+
const char *rng);
|
287
|
+
XMLPUBFUN int XMLCALL
|
288
|
+
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
|
289
|
+
xmlRelaxNGValidCtxtPtr ctxt,
|
290
|
+
int options);
|
291
|
+
|
292
|
+
XMLPUBFUN int XMLCALL
|
293
|
+
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
294
|
+
xmlRelaxNGPtr schema);
|
295
|
+
XMLPUBFUN int XMLCALL
|
296
|
+
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
297
|
+
const char *xsd);
|
298
|
+
XMLPUBFUN int XMLCALL
|
299
|
+
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
|
300
|
+
xmlSchemaValidCtxtPtr ctxt,
|
301
|
+
int options);
|
302
|
+
XMLPUBFUN int XMLCALL
|
303
|
+
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
|
304
|
+
xmlSchemaPtr schema);
|
305
|
+
#endif
|
306
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
307
|
+
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
308
|
+
XMLPUBFUN int XMLCALL
|
309
|
+
xmlTextReaderStandalone (xmlTextReaderPtr reader);
|
310
|
+
|
311
|
+
|
312
|
+
/*
|
313
|
+
* Index lookup
|
314
|
+
*/
|
315
|
+
XMLPUBFUN long XMLCALL
|
316
|
+
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
317
|
+
|
318
|
+
/*
|
319
|
+
* New more complete APIs for simpler creation and reuse of readers
|
320
|
+
*/
|
321
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
322
|
+
xmlReaderWalker (xmlDocPtr doc);
|
323
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
324
|
+
xmlReaderForDoc (const xmlChar * cur,
|
325
|
+
const char *URL,
|
326
|
+
const char *encoding,
|
327
|
+
int options);
|
328
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
329
|
+
xmlReaderForFile (const char *filename,
|
330
|
+
const char *encoding,
|
331
|
+
int options);
|
332
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
333
|
+
xmlReaderForMemory (const char *buffer,
|
334
|
+
int size,
|
335
|
+
const char *URL,
|
336
|
+
const char *encoding,
|
337
|
+
int options);
|
338
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
339
|
+
xmlReaderForFd (int fd,
|
340
|
+
const char *URL,
|
341
|
+
const char *encoding,
|
342
|
+
int options);
|
343
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
344
|
+
xmlReaderForIO (xmlInputReadCallback ioread,
|
345
|
+
xmlInputCloseCallback ioclose,
|
346
|
+
void *ioctx,
|
347
|
+
const char *URL,
|
348
|
+
const char *encoding,
|
349
|
+
int options);
|
350
|
+
|
351
|
+
XMLPUBFUN int XMLCALL
|
352
|
+
xmlReaderNewWalker (xmlTextReaderPtr reader,
|
353
|
+
xmlDocPtr doc);
|
354
|
+
XMLPUBFUN int XMLCALL
|
355
|
+
xmlReaderNewDoc (xmlTextReaderPtr reader,
|
356
|
+
const xmlChar * cur,
|
357
|
+
const char *URL,
|
358
|
+
const char *encoding,
|
359
|
+
int options);
|
360
|
+
XMLPUBFUN int XMLCALL
|
361
|
+
xmlReaderNewFile (xmlTextReaderPtr reader,
|
362
|
+
const char *filename,
|
363
|
+
const char *encoding,
|
364
|
+
int options);
|
365
|
+
XMLPUBFUN int XMLCALL
|
366
|
+
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
367
|
+
const char *buffer,
|
368
|
+
int size,
|
369
|
+
const char *URL,
|
370
|
+
const char *encoding,
|
371
|
+
int options);
|
372
|
+
XMLPUBFUN int XMLCALL
|
373
|
+
xmlReaderNewFd (xmlTextReaderPtr reader,
|
374
|
+
int fd,
|
375
|
+
const char *URL,
|
376
|
+
const char *encoding,
|
377
|
+
int options);
|
378
|
+
XMLPUBFUN int XMLCALL
|
379
|
+
xmlReaderNewIO (xmlTextReaderPtr reader,
|
380
|
+
xmlInputReadCallback ioread,
|
381
|
+
xmlInputCloseCallback ioclose,
|
382
|
+
void *ioctx,
|
383
|
+
const char *URL,
|
384
|
+
const char *encoding,
|
385
|
+
int options);
|
386
|
+
/*
|
387
|
+
* Error handling extensions
|
388
|
+
*/
|
389
|
+
typedef void * xmlTextReaderLocatorPtr;
|
390
|
+
|
391
|
+
/**
|
392
|
+
* xmlTextReaderErrorFunc:
|
393
|
+
* @arg: the user argument
|
394
|
+
* @msg: the message
|
395
|
+
* @severity: the severity of the error
|
396
|
+
* @locator: a locator indicating where the error occurred
|
397
|
+
*
|
398
|
+
* Signature of an error callback from a reader parser
|
399
|
+
*/
|
400
|
+
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
401
|
+
const char *msg,
|
402
|
+
xmlParserSeverities severity,
|
403
|
+
xmlTextReaderLocatorPtr locator);
|
404
|
+
XMLPUBFUN int XMLCALL
|
405
|
+
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
406
|
+
XMLPUBFUN xmlChar * XMLCALL
|
407
|
+
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
408
|
+
XMLPUBFUN void XMLCALL
|
409
|
+
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
410
|
+
xmlTextReaderErrorFunc f,
|
411
|
+
void *arg);
|
412
|
+
XMLPUBFUN void XMLCALL
|
413
|
+
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
414
|
+
xmlStructuredErrorFunc f,
|
415
|
+
void *arg);
|
416
|
+
XMLPUBFUN void XMLCALL
|
417
|
+
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
418
|
+
xmlTextReaderErrorFunc *f,
|
419
|
+
void **arg);
|
420
|
+
|
421
|
+
#endif /* LIBXML_READER_ENABLED */
|
422
|
+
|
423
|
+
#ifdef __cplusplus
|
424
|
+
}
|
425
|
+
#endif
|
426
|
+
|
427
|
+
#endif /* __XML_XMLREADER_H__ */
|
428
|
+
|
@@ -0,0 +1,222 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: regular expressions handling
|
3
|
+
* Description: basic API for libxml regular expressions handling used
|
4
|
+
* for XML Schemas and validation.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_REGEXP_H__
|
12
|
+
#define __XML_REGEXP_H__
|
13
|
+
|
14
|
+
#include <libxml/xmlversion.h>
|
15
|
+
|
16
|
+
#ifdef LIBXML_REGEXP_ENABLED
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* xmlRegexpPtr:
|
24
|
+
*
|
25
|
+
* A libxml regular expression, they can actually be far more complex
|
26
|
+
* thank the POSIX regex expressions.
|
27
|
+
*/
|
28
|
+
typedef struct _xmlRegexp xmlRegexp;
|
29
|
+
typedef xmlRegexp *xmlRegexpPtr;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* xmlRegExecCtxtPtr:
|
33
|
+
*
|
34
|
+
* A libxml progressive regular expression evaluation context
|
35
|
+
*/
|
36
|
+
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
|
37
|
+
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
|
38
|
+
|
39
|
+
#ifdef __cplusplus
|
40
|
+
}
|
41
|
+
#endif
|
42
|
+
#include <libxml/tree.h>
|
43
|
+
#include <libxml/dict.h>
|
44
|
+
#ifdef __cplusplus
|
45
|
+
extern "C" {
|
46
|
+
#endif
|
47
|
+
|
48
|
+
/*
|
49
|
+
* The POSIX like API
|
50
|
+
*/
|
51
|
+
XMLPUBFUN xmlRegexpPtr XMLCALL
|
52
|
+
xmlRegexpCompile (const xmlChar *regexp);
|
53
|
+
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
|
54
|
+
XMLPUBFUN int XMLCALL
|
55
|
+
xmlRegexpExec (xmlRegexpPtr comp,
|
56
|
+
const xmlChar *value);
|
57
|
+
XMLPUBFUN void XMLCALL
|
58
|
+
xmlRegexpPrint (FILE *output,
|
59
|
+
xmlRegexpPtr regexp);
|
60
|
+
XMLPUBFUN int XMLCALL
|
61
|
+
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
|
62
|
+
|
63
|
+
/**
|
64
|
+
* xmlRegExecCallbacks:
|
65
|
+
* @exec: the regular expression context
|
66
|
+
* @token: the current token string
|
67
|
+
* @transdata: transition data
|
68
|
+
* @inputdata: input data
|
69
|
+
*
|
70
|
+
* Callback function when doing a transition in the automata
|
71
|
+
*/
|
72
|
+
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
|
73
|
+
const xmlChar *token,
|
74
|
+
void *transdata,
|
75
|
+
void *inputdata);
|
76
|
+
|
77
|
+
/*
|
78
|
+
* The progressive API
|
79
|
+
*/
|
80
|
+
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
|
81
|
+
xmlRegNewExecCtxt (xmlRegexpPtr comp,
|
82
|
+
xmlRegExecCallbacks callback,
|
83
|
+
void *data);
|
84
|
+
XMLPUBFUN void XMLCALL
|
85
|
+
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
|
86
|
+
XMLPUBFUN int XMLCALL
|
87
|
+
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
|
88
|
+
const xmlChar *value,
|
89
|
+
void *data);
|
90
|
+
XMLPUBFUN int XMLCALL
|
91
|
+
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
|
92
|
+
const xmlChar *value,
|
93
|
+
const xmlChar *value2,
|
94
|
+
void *data);
|
95
|
+
|
96
|
+
XMLPUBFUN int XMLCALL
|
97
|
+
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
|
98
|
+
int *nbval,
|
99
|
+
int *nbneg,
|
100
|
+
xmlChar **values,
|
101
|
+
int *terminal);
|
102
|
+
XMLPUBFUN int XMLCALL
|
103
|
+
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
|
104
|
+
const xmlChar **string,
|
105
|
+
int *nbval,
|
106
|
+
int *nbneg,
|
107
|
+
xmlChar **values,
|
108
|
+
int *terminal);
|
109
|
+
#ifdef LIBXML_EXPR_ENABLED
|
110
|
+
/*
|
111
|
+
* Formal regular expression handling
|
112
|
+
* Its goal is to do some formal work on content models
|
113
|
+
*/
|
114
|
+
|
115
|
+
/* expressions are used within a context */
|
116
|
+
typedef struct _xmlExpCtxt xmlExpCtxt;
|
117
|
+
typedef xmlExpCtxt *xmlExpCtxtPtr;
|
118
|
+
|
119
|
+
XMLPUBFUN void XMLCALL
|
120
|
+
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
|
121
|
+
XMLPUBFUN xmlExpCtxtPtr XMLCALL
|
122
|
+
xmlExpNewCtxt (int maxNodes,
|
123
|
+
xmlDictPtr dict);
|
124
|
+
|
125
|
+
XMLPUBFUN int XMLCALL
|
126
|
+
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
|
127
|
+
XMLPUBFUN int XMLCALL
|
128
|
+
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
|
129
|
+
|
130
|
+
/* Expressions are trees but the tree is opaque */
|
131
|
+
typedef struct _xmlExpNode xmlExpNode;
|
132
|
+
typedef xmlExpNode *xmlExpNodePtr;
|
133
|
+
|
134
|
+
typedef enum {
|
135
|
+
XML_EXP_EMPTY = 0,
|
136
|
+
XML_EXP_FORBID = 1,
|
137
|
+
XML_EXP_ATOM = 2,
|
138
|
+
XML_EXP_SEQ = 3,
|
139
|
+
XML_EXP_OR = 4,
|
140
|
+
XML_EXP_COUNT = 5
|
141
|
+
} xmlExpNodeType;
|
142
|
+
|
143
|
+
/*
|
144
|
+
* 2 core expressions shared by all for the empty language set
|
145
|
+
* and for the set with just the empty token
|
146
|
+
*/
|
147
|
+
XMLPUBVAR xmlExpNodePtr forbiddenExp;
|
148
|
+
XMLPUBVAR xmlExpNodePtr emptyExp;
|
149
|
+
|
150
|
+
/*
|
151
|
+
* Expressions are reference counted internally
|
152
|
+
*/
|
153
|
+
XMLPUBFUN void XMLCALL
|
154
|
+
xmlExpFree (xmlExpCtxtPtr ctxt,
|
155
|
+
xmlExpNodePtr expr);
|
156
|
+
XMLPUBFUN void XMLCALL
|
157
|
+
xmlExpRef (xmlExpNodePtr expr);
|
158
|
+
|
159
|
+
/*
|
160
|
+
* constructors can be either manual or from a string
|
161
|
+
*/
|
162
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
163
|
+
xmlExpParse (xmlExpCtxtPtr ctxt,
|
164
|
+
const char *expr);
|
165
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
166
|
+
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
|
167
|
+
const xmlChar *name,
|
168
|
+
int len);
|
169
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
170
|
+
xmlExpNewOr (xmlExpCtxtPtr ctxt,
|
171
|
+
xmlExpNodePtr left,
|
172
|
+
xmlExpNodePtr right);
|
173
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
174
|
+
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
|
175
|
+
xmlExpNodePtr left,
|
176
|
+
xmlExpNodePtr right);
|
177
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
178
|
+
xmlExpNewRange (xmlExpCtxtPtr ctxt,
|
179
|
+
xmlExpNodePtr subset,
|
180
|
+
int min,
|
181
|
+
int max);
|
182
|
+
/*
|
183
|
+
* The really interesting APIs
|
184
|
+
*/
|
185
|
+
XMLPUBFUN int XMLCALL
|
186
|
+
xmlExpIsNillable(xmlExpNodePtr expr);
|
187
|
+
XMLPUBFUN int XMLCALL
|
188
|
+
xmlExpMaxToken (xmlExpNodePtr expr);
|
189
|
+
XMLPUBFUN int XMLCALL
|
190
|
+
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
|
191
|
+
xmlExpNodePtr expr,
|
192
|
+
const xmlChar**langList,
|
193
|
+
int len);
|
194
|
+
XMLPUBFUN int XMLCALL
|
195
|
+
xmlExpGetStart (xmlExpCtxtPtr ctxt,
|
196
|
+
xmlExpNodePtr expr,
|
197
|
+
const xmlChar**tokList,
|
198
|
+
int len);
|
199
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
200
|
+
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
|
201
|
+
xmlExpNodePtr expr,
|
202
|
+
const xmlChar *str,
|
203
|
+
int len);
|
204
|
+
XMLPUBFUN xmlExpNodePtr XMLCALL
|
205
|
+
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
|
206
|
+
xmlExpNodePtr expr,
|
207
|
+
xmlExpNodePtr sub);
|
208
|
+
XMLPUBFUN int XMLCALL
|
209
|
+
xmlExpSubsume (xmlExpCtxtPtr ctxt,
|
210
|
+
xmlExpNodePtr expr,
|
211
|
+
xmlExpNodePtr sub);
|
212
|
+
XMLPUBFUN void XMLCALL
|
213
|
+
xmlExpDump (xmlBufferPtr buf,
|
214
|
+
xmlExpNodePtr expr);
|
215
|
+
#endif /* LIBXML_EXPR_ENABLED */
|
216
|
+
#ifdef __cplusplus
|
217
|
+
}
|
218
|
+
#endif
|
219
|
+
|
220
|
+
#endif /* LIBXML_REGEXP_ENABLED */
|
221
|
+
|
222
|
+
#endif /*__XML_REGEXP_H__ */
|