├── .gitignore
├── .vscode
├── launch.json
└── settings.json
├── Readme.md
├── binding.gyp
├── index.d.ts
├── index.ts
├── jest.config.js
├── libxml-syntax-error.cpp
├── libxml-syntax-error.h
├── libxml.bak.cpp
├── libxml.cpp
├── libxml.h
├── package-lock.json
├── package.json
├── tests
├── data
│ ├── test-bad-default.xml
│ ├── test-bad-doctype.xml
│ ├── test-default-not-utf8.xml
│ ├── test-default.xml
│ ├── test-not-valid-dtd.xml
│ ├── test-not-wellformed.xml
│ ├── test-unknown-doctype.xml
│ └── test-valid-schema.xml
├── dtd
│ ├── myBADdoctype.dtd
│ ├── myBADdoctype2.dtd
│ ├── mydoctype.dtd
│ └── mydoctype2.dtd
├── index.ts
├── libxml-test.spec.js
├── libxml-test.spec.ts
└── xsd
│ ├── MARC21slim-bad.xsd
│ └── MARC21slim.xsd
├── tsconfig.json
└── vendor
└── libxml
├── Copyright
├── DOCBparser.c
├── HTMLparser.c
├── HTMLtree.c
├── SAX.c
├── SAX2.c
├── buf.c
├── buf.h
├── c14n.c
├── catalog.c
├── chvalid.c
├── config.h
├── config.h.gch
├── debugXML.c
├── dict.c
├── elfgcchack.h
├── enc.h
├── encoding.c
├── entities.c
├── error.c
├── globals.c
├── hash.c
├── include
├── libxml
│ ├── DOCBparser.h
│ ├── HTMLparser.h
│ ├── HTMLtree.h
│ ├── Makefile
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── SAX.h
│ ├── SAX2.h
│ ├── c14n.h
│ ├── catalog.h
│ ├── chvalid.h
│ ├── debugXML.h
│ ├── dict.h
│ ├── encoding.h
│ ├── entities.h
│ ├── globals.h
│ ├── hash.h
│ ├── list.h
│ ├── nanoftp.h
│ ├── nanohttp.h
│ ├── parser.h
│ ├── parserInternals.h
│ ├── pattern.h
│ ├── relaxng.h
│ ├── schemasInternals.h
│ ├── schematron.h
│ ├── threads.h
│ ├── tree.h
│ ├── uri.h
│ ├── valid.h
│ ├── xinclude.h
│ ├── xlink.h
│ ├── xmlIO.h
│ ├── xmlautomata.h
│ ├── xmlerror.h
│ ├── xmlexports.h
│ ├── xmlmemory.h
│ ├── xmlmodule.h
│ ├── xmlreader.h
│ ├── xmlregexp.h
│ ├── xmlsave.h
│ ├── xmlschemas.h
│ ├── xmlschemastypes.h
│ ├── xmlstring.h
│ ├── xmlunicode.h
│ ├── xmlversion.h
│ ├── xmlwriter.h
│ ├── xpath.h
│ ├── xpathInternals.h
│ └── xpointer.h
├── win32config.h
└── wsockcompat.h
├── legacy.c
├── libxml.h
├── list.c
├── nanoftp.c
├── nanohttp.c
├── parser.c
├── parserInternals.c
├── pattern.c
├── relaxng.c
├── runsuite.c
├── save.h
├── schematron.c
├── threads.c
├── timsort.h
├── tree.c
├── trio.c
├── trio.h
├── triodef.h
├── trionan.c
├── trionan.h
├── triop.h
├── triostr.c
├── triostr.h
├── uri.c
├── valid.c
├── xinclude.c
├── xlink.c
├── xmlIO.c
├── xmlcatalog.c
├── xmllint.c
├── xmlmemory.c
├── xmlmodule.c
├── xmlreader.c
├── xmlregexp.c
├── xmlsave.c
├── xmlschemas.c
├── xmlschemastypes.c
├── xmlstring.c
├── xmlunicode.c
├── xmlwriter.c
├── xpath.c
├── xpointer.c
├── xzlib.c
└── xzlib.h
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | # Created by https://www.gitignore.io/api/node,linux,macos,windows,intellij
3 |
4 | ### Intellij ###
5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7 |
8 | # User-specific stuff:
9 | .idea/**/workspace.xml
10 | .idea/**/tasks.xml
11 | .idea/dictionaries
12 | index.js
13 |
14 | .idea/
15 |
16 | # Sensitive or high-churn files:
17 | .idea/**/dataSources/
18 | .idea/**/dataSources.ids
19 | .idea/**/dataSources.xml
20 | .idea/**/dataSources.local.xml
21 | .idea/**/sqlDataSources.xml
22 | .idea/**/dynamic.xml
23 | .idea/**/uiDesigner.xml
24 |
25 | # Gradle:
26 | .idea/**/gradle.xml
27 | .idea/**/libraries
28 |
29 | # CMake
30 | cmake-build-debug/
31 |
32 | # Mongo Explorer plugin:
33 | .idea/**/mongoSettings.xml
34 |
35 | ## File-based project format:
36 | *.iws
37 |
38 | ## Plugin-specific files:
39 |
40 | # IntelliJ
41 | /out/
42 |
43 | # mpeltonen/sbt-idea plugin
44 | .idea_modules/
45 |
46 | # JIRA plugin
47 | atlassian-ide-plugin.xml
48 |
49 | # Cursive Clojure plugin
50 | .idea/replstate.xml
51 |
52 | # Ruby plugin and RubyMine
53 | /.rakeTasks
54 |
55 | # Crashlytics plugin (for Android Studio and IntelliJ)
56 | com_crashlytics_export_strings.xml
57 | crashlytics.properties
58 | crashlytics-build.properties
59 | fabric.properties
60 |
61 | ### Intellij Patch ###
62 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
63 |
64 | # *.iml
65 | # modules.xml
66 | # .idea/misc.xml
67 | # *.ipr
68 |
69 | # Sonarlint plugin
70 | .idea/sonarlint
71 |
72 | ### Linux ###
73 | *~
74 |
75 | # temporary files which can be created if a process still has a handle open of a deleted file
76 | .fuse_hidden*
77 |
78 | # KDE directory preferences
79 | .directory
80 |
81 | # Linux trash folder which might appear on any partition or disk
82 | .Trash-*
83 |
84 | # .nfs files are created when an open file is removed but is still being accessed
85 | .nfs*
86 |
87 | ### macOS ###
88 | *.DS_Store
89 | .AppleDouble
90 | .LSOverride
91 |
92 | # Icon must end with two \r
93 | Icon
94 |
95 | # Thumbnails
96 | ._*
97 |
98 | # Files that might appear in the root of a volume
99 | .DocumentRevisions-V100
100 | .fseventsd
101 | .Spotlight-V100
102 | .TemporaryItems
103 | .Trashes
104 | .VolumeIcon.icns
105 | .com.apple.timemachine.donotpresent
106 |
107 | # Directories potentially created on remote AFP share
108 | .AppleDB
109 | .AppleDesktop
110 | Network Trash Folder
111 | Temporary Items
112 | .apdisk
113 |
114 | ### Node ###
115 | # Logs
116 | logs
117 | *.log
118 | npm-debug.log*
119 | yarn-debug.log*
120 | yarn-error.log*
121 |
122 | # Runtime data
123 | pids
124 | *.pid
125 | *.seed
126 | *.pid.lock
127 |
128 | # Directory for instrumented libs generated by jscoverage/JSCover
129 | lib-cov
130 |
131 | # Coverage directory used by tools like istanbul
132 | coverage
133 |
134 | # nyc test coverage
135 | .nyc_output
136 |
137 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
138 | .grunt
139 |
140 | # Bower dependency directory (https://bower.io/)
141 | bower_components
142 |
143 | # node-waf configuration
144 | .lock-wscript
145 |
146 | # Compiled binary addons (http://nodejs.org/api/addons.html)
147 | build/Release
148 |
149 | # Dependency directories
150 | node_modules/
151 | jspm_packages/
152 |
153 | # Typescript v1 declaration files
154 | typings/
155 |
156 | # Optional npm cache directory
157 | .npm
158 |
159 | # Optional eslint cache
160 | .eslintcache
161 |
162 | # Optional REPL history
163 | .node_repl_history
164 |
165 | # Output of 'npm pack'
166 | *.tgz
167 |
168 | # Yarn Integrity file
169 | .yarn-integrity
170 |
171 | # dotenv environment variables file
172 | .env
173 |
174 |
175 | ### Windows ###
176 | # Windows thumbnail cache files
177 | Thumbs.db
178 | ehthumbs.db
179 | ehthumbs_vista.db
180 |
181 | # Folder config file
182 | Desktop.ini
183 |
184 | # Recycle Bin used on file shares
185 | $RECYCLE.BIN/
186 |
187 | # Windows Installer files
188 | *.cab
189 | *.msi
190 | *.msm
191 | *.msp
192 |
193 | # Windows shortcuts
194 | *.lnk
195 |
196 | # End of https://www.gitignore.io/api/node,linux,macos,windows,intellij
197 |
198 | build*
199 | prebuilds
200 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "(lldb) Lancer",
6 | "type": "cppdbg",
7 | "request": "launch",
8 | "program": "/Users/dieudonn/.nvm/versions/node/v12.13.0/bin/node",
9 | "args": [
10 | "/Users/dieudonn/Dev/node-libxml/test/libxml-test.js"
11 | ],
12 | "stopAtEntry": true,
13 | "cwd": "${workspaceFolder}",
14 | "environment": [],
15 | "externalConsole": false,
16 | "MIMode": "lldb"
17 | },
18 | {
19 | "type": "lldb",
20 | "request": "launch",
21 | "name": "Launch Program",
22 | "preLaunchTask": "npm: build:dev",
23 | "program": "/Users/dieudonn/.nvm/versions/node/v12.13.0/bin/node",
24 | "args": [
25 | "/Users/dieudonn/Dev/node-libxml/test/index.js"
26 | ]
27 | }
28 | ]
29 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "*.twig": "twig",
4 | "ios": "cpp",
5 | "vector": "cpp",
6 | "iostream": "cpp",
7 | "iosfwd": "cpp"
8 | },
9 | "C_Cpp.errorSquiggles": "disabled"
10 | }
11 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # Node-LibXML
2 |
3 | #### For old node.js versions please use version < 4.0.0 Already for old LTS node (4,6,8) `npm install node-libxml@3.2.5`;
4 |
5 | #### For new node.js versions (10,12,14,16,18,20) we are using n-api so please install `npm install node-libxml@5.0.0`, its compatible with arm proc too for version >= 16 (you wil notice a free memory message when using free memory function after node >16) 🙂
6 |
7 | _Node-Libxml_ is a _[libxml2]_ Node.js Wrapper
8 |
9 | It can perform:
10 |
11 | - Well-formed check & error report
12 | - Validity against DTD/XSD(Schema) check,
13 | - Get doctype information (about DTD)
14 | - Get XPath Values
15 | - Load XMl from string or file path
16 |
17 | ## Requirements:
18 |
19 | Node-Libxml has no dependencies; it's fully bundled, so you can just use it as it comes :)
20 |
21 | Works on: Linux, macOS & Windows (no 32bits, **just 64 bits**)
22 |
23 | ## Why use it
24 |
25 | _Node-LibXML_ has been thought differently than _[libxmljs]_; whereas _libxmljs_ can be use in common uses, you can use _node-libxml_ if:
26 |
27 | - You want to validate against DTD (_libxmljs_ can't)
28 | - You want a silent program if XML is not well-formed (_node-libxml_ returns well-formed error in object; _libxmljs_ throws)
29 | - You want to do XML processing in parallel forks
30 | - You want to load XML from file path *or* string
31 | - You want to validate against DTD / schema on multiple documents with just *one* DTD/schema loaded in memory (_libxmljs_ loads it on each validation request), so it's clearly by far fastest!
32 |
33 | ## Install
34 |
35 | ```bash
36 | npm i node-libxml
37 | ```
38 |
39 | ## Use
40 |
41 | ```javascript
42 | const Libxml = require('node-libxml').Libxml; // or import {Libxml} from 'node-libxml'
43 | let libxml = new Libxml();
44 |
45 | let xmlIsWellformed = libxml.loadXml('path/to/xml');
46 | let xmlIsWellformedStr = libxml.loadXmlFromString('test');
47 |
48 | console.log(xmlIsWellformed);
49 | console.log(libxml.wellformedErrors);
50 |
51 | console.log(libxml.getDtd());
52 |
53 | libxml.loadDtds(['path/to/dtd1', 'path/to/dtd2']);
54 | let xmlIsValid = libxml.validateAgainstDtds();
55 | console.log(xmlIsValid);
56 | console.log(libxml.validationDtdErrors);
57 |
58 | //Get some xpaths;
59 | let aRandomPathBoolean = libxml.xpathSelect('boolean(//some/path'));
60 | let aRandomPathNumber = libxml.xpathSelect('number(//some/path'));
61 | let countSomeElements = libxml.xpathSelect('count(//some/path'));
62 | //... & all xpath could do I think
63 | ```
64 |
65 | See our [tests](tests/libxml-test.spec.ts) for more examples.
66 |
67 | ## API
68 |
69 | ### Loading functions
70 |
71 | ##### `loadXml(string)`
72 |
73 | A function of _libxml2_ to load the XML file
74 | * TAKE a path & RETURN `true` if well-formed | `false` if not
75 | * SET an array `wellformedErrors` in _libxml2_ element containing well-formed errors
76 |
77 | ##### `loadXmlFromString(string)`
78 |
79 | A function of _libxml2_ to create the XML DOM from a string
80 | * TAKE a string containing XML & RETURN `true` if well-formed | `false` if not
81 | * SET an array `wellformedErrors` in _libxml2_ element containing well-formed errors
82 |
83 | ##### `loadDtds(array)`
84 |
85 | A function of _libxml2_ to load the DTD(s) file(s)
86 | * TAKE an array of path of & RETURN nothing
87 | * SET an array `dtdsLoadedErrors` in _libxml2_ element IF error happened on loading DTD(s)
88 |
89 | ##### `loadSchemas(array)`
90 |
91 | A function of _libxml2_ to load the XSD(s) file(s)
92 | [ex](tests/libxml-test.spec.ts#L206)
93 | * TAKE an array of path of & RETURN nothing
94 | * SET an array `schemasLoadedErrors` in _libxml2_ element IF error happened on loading XSD(s)
95 |
96 |
97 | ### Validating functions
98 |
99 | ##### `validateAgainstDtd()`
100 |
101 | A function of _libxml2_ to validate against the previously loaded DTD(s)
102 | * TAKE nothing & RETURN a string which is the name of the first DTD which has validated
103 | * RETURN `false` if no DTD(s) have validated the XML
104 | * RETURN `null` if not any DTD have been correctly loaded
105 | * SET an array `validationDtdErrors` in _libxml2_ element if no DTD has validate
106 |
107 | ##### `validateAgainstSchemas()`
108 |
109 | A function of _libxml2_ to validate against the previously loaded DTD(s)
110 | * TAKE nothing & RETURN a string which is the name of the first DTD which has validated
111 | * RETURN `false` if no DTD(s) have validated the XML
112 | * RETURN `null` if no any schema have been correctly loaded
113 | * SET an array `validationDtdErrors` in _libxml2_ element if no DTD has validated
114 |
115 | ### Get information of the XML
116 |
117 | #### `getDtd()`
118 |
119 | A function of _libxml2_ to evaluate the xpath on the previously loaded XML
120 | * TAKE nothing & RETURN an object containing name, externalId & systemId
121 |
122 | #### `xpathSelect(string)`
123 |
124 | A function of _libxml2_ to evaluate the xpath on the previously loaded XML
125 | [ex](tests/libxml-test.spec.ts#L109)
126 | * TAKE string & RETURN value depending on what you asked (number, boolean,...)
127 | * RETURN `null` if no match
128 |
129 | ### Memory management
130 |
131 | Use those functions when you have finished jobs of elements, or before overwrite them.
132 | [ex](tests/libxml-test.spec.tss#138)
133 |
134 | ##### `freeXml()`
135 |
136 | A function of _libxml2_ to free XML memory file
137 | * TAKE nothing & RETURN nothing
138 | * FREE memory & clear `wellformedErrors` property on _libxml2_ instance
139 |
140 | ##### `freeDtds()`
141 |
142 | A function of _libxml2_ to free all the DTD(s) in memory
143 | * TAKE nothing & RETURN nothing
144 | * FREE memory & clear `dtdsLoadedErrors` property on _libxml2_ instance
145 | * FREE memory & clear `validationDtdErrors` property on _libxml2_ instance
146 |
147 | ##### `freeSchemas()`
148 |
149 | A function of _libxml2_ to free all the Schema in memory
150 | * TAKE nothing & RETURN nothing
151 | * FREE memory & clear 'schemasLoadedErrors' property on _libxml2_ instance
152 | * FREE memory & clear 'validationSchemaErrors' property on _libxml2_ instance
153 |
154 | ##### `clearAll()`
155 |
156 | A function of _libxml2_ to free all the memory taken by _libxml2_
157 | * TAKE nothing & RETURN nothing
158 | * free all memory in all instance in all fork using by _libxml2_
159 |
160 | ## Contribute
161 |
162 | ### Install
163 |
164 | - `npm i`
165 | - `npm test` should pass 😎
166 | - `npm run publish`
167 |
168 | ## Important notes
169 |
170 | Travis & appveyor cannot be used anymore with n-api because auto-publish from node-pre-gyp-github not working anymore + we have now n release for one node version
171 |
172 |
173 | [libxml2]: https://gitlab.gnome.org/GNOME/libxml2
174 | [libxmljs]: https://github.com/libxmljs/libxmljs
175 |
--------------------------------------------------------------------------------
/binding.gyp:
--------------------------------------------------------------------------------
1 | {
2 | 'variables' : {
3 | 'openssl_fips': '',
4 | },
5 | 'targets': [
6 | {
7 | 'target_name': 'xml',
8 | 'cflags!': [ '-fno-exceptions' ],
9 | 'cflags_cc!': [ '-fno-exceptions' ],
10 | 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
11 | 'CLANG_CXX_LIBRARY': 'libc++',
12 | 'MACOSX_DEPLOYMENT_TARGET': '10.7',
13 | },
14 | 'msvs_settings': {
15 | 'VCCLCompilerTool': { 'ExceptionHandling': 1 },
16 | },
17 | 'product_extension': 'node',
18 | 'type': 'shared_library',
19 | 'include_dirs': [
20 | ';
169 | validationSchemaErrors?: Record;
170 | }
171 |
--------------------------------------------------------------------------------
/index.ts:
--------------------------------------------------------------------------------
1 | //@ts-ignore
2 | import binding from "node-gyp-build";
3 | export const Libxml = binding(__dirname).Libxml;
4 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: 'ts-jest',
4 | testEnvironment: 'node',
5 | };
6 |
--------------------------------------------------------------------------------
/libxml-syntax-error.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * This is the Errors Class script, for wellformed & validation DTD
3 | */
4 | #include
5 | #include
6 | #include "libxml-syntax-error.h"
7 |
8 | void setStringField(Napi::Object obj, const char *name, const char *value, Napi::Env env)
9 | {
10 | Napi::HandleScope scope(env);
11 | if (!value)
12 | {
13 | return;
14 | }
15 | obj.Set(name, Napi::String::New(env, value));
16 | }
17 |
18 | void setNumericField(Napi::Object obj, const char *name, const int value, Napi::Env env)
19 | {
20 | Napi::HandleScope scope(env);
21 | obj.Set(name, Napi::Number::New(env, value));
22 | }
23 |
24 | Napi::Value
25 | XmlSyntaxError::BuildSyntaxError(xmlError *error, Napi::Env env)
26 | {
27 | Napi::EscapableHandleScope scope(env);
28 |
29 | auto err = Napi::TypeError::New(env,
30 | Napi::String::New(env, error->message));
31 | Napi::Object out = Napi::Object::New(env);
32 |
33 | setStringField(out, "message", error->message, env);
34 | setNumericField(out, "level", error->level, env);
35 | setNumericField(out, "column", error->int2, env);
36 | setStringField(out, "file", error->file, env);
37 | setNumericField(out, "line", error->line, env);
38 |
39 | if (error->int1)
40 | {
41 | setNumericField(out, "int1", error->int1, env);
42 | }
43 | return out;
44 | }
45 |
46 | uint32_t XmlSyntaxError::maxError{100};
47 | Napi::Env* XmlSyntaxError::env = nullptr;
48 |
49 | void XmlSyntaxError::ChangeMaxNumberOfError(int max)
50 | {
51 | XmlSyntaxError::maxError = max;
52 | }
53 |
54 | uint32_t XmlSyntaxError::GetMaxNumberOfError() {
55 | return XmlSyntaxError::maxError;
56 | }
57 |
58 | void XmlSyntaxError::PushToArray(void *errs, xmlError *error)
59 | {
60 | Napi::Array errors = *reinterpret_cast(errs);
61 | if (errors.Length() >= maxError)
62 | {
63 | return;
64 | }
65 | Napi::Value castedError = {XmlSyntaxError::BuildSyntaxError(error, *XmlSyntaxError::env)};
66 | errors.Set(errors.Length(), castedError);
67 | }
68 |
69 | void XmlSyntaxError::PushToArray(Napi::Array& errors, const char* errorMessage)
70 | {
71 | if (errors.Length() >= maxError)
72 | {
73 | return;
74 | }
75 | Napi::String messageToPush = Napi::String::New(*XmlSyntaxError::env, errorMessage);
76 | errors.Set(errors.Length(), messageToPush);
77 | }
78 |
79 | MaxErrorNumberRestorer::MaxErrorNumberRestorer(): max(XmlSyntaxError::GetMaxNumberOfError()) { }
80 |
81 | MaxErrorNumberRestorer::~MaxErrorNumberRestorer() {
82 | XmlSyntaxError::ChangeMaxNumberOfError(max);
83 | }
--------------------------------------------------------------------------------
/libxml-syntax-error.h:
--------------------------------------------------------------------------------
1 | #ifndef LIBXML_SYNTAX_ERROR
2 | #define LIBXML_SYNTAX_ERROR
3 |
4 | #include
5 |
6 | #include "libxml.h"
7 |
8 | class XmlSyntaxError
9 | {
10 | static uint32_t maxError;
11 |
12 | public:
13 | static Napi::Env* env;
14 | static void ChangeMaxNumberOfError(int max);
15 | static uint32_t GetMaxNumberOfError();
16 |
17 | // push xmlError onto Napi::Array
18 | static void PushToArray(void *errs, xmlError *error);
19 | static void PushToArray(Napi::Array& errs, const char* errorMessage);
20 |
21 | // create a Napi object for the syntax eror
22 | static Napi::Value BuildSyntaxError(xmlError *error, Napi::Env env);
23 | };
24 |
25 | class MaxErrorNumberRestorer {
26 | public:
27 | MaxErrorNumberRestorer();
28 | ~MaxErrorNumberRestorer();
29 | private:
30 | uint32_t max;
31 | MaxErrorNumberRestorer(MaxErrorNumberRestorer const &) = delete;
32 | void operator=(MaxErrorNumberRestorer const &) = delete;
33 | };
34 |
35 | // LIBXML_SYNTAX_ERROR
36 | #endif
37 |
--------------------------------------------------------------------------------
/libxml.h:
--------------------------------------------------------------------------------
1 | #ifndef LIBXML_H
2 | #define LIBXML_H
3 |
4 | #include "napi.h"
5 | #include
6 | #include
7 |
8 | #include "libxml/parser.h"
9 | #include "libxml/valid.h"
10 | #include "libxml/xmlschemastypes.h"
11 | #include "libxml/xmlschemas.h"
12 | #include "libxml/tree.h"
13 | #include "libxml/xpath.h"
14 | #include "libxml/xpathInternals.h"
15 |
16 | #include "libxml-syntax-error.h"
17 |
18 | enum
19 | {
20 | ERROR_OCCURED = -1, // Une erreur est survenue pendant la validation
21 | NOT_VALID = 0, // Le document n'est pas valide
22 | VALID = 1 // Le document est valide
23 | };
24 |
25 | using namespace std;
26 |
27 | class Libxml : public Napi::ObjectWrap
28 | {
29 | public:
30 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
31 | Libxml(const Napi::CallbackInfo &info);
32 |
33 | private:
34 | // static void errorsHandler(void *, xmlErrorPtr);
35 | // explicit Libxml();
36 | xmlDocPtr docPtr = NULL;
37 | string path;
38 | vector dtdsPaths;
39 | vector schemasPaths;
40 | static Napi::FunctionReference constructor;
41 | Napi::Value loadXml(const Napi::CallbackInfo &info);
42 | Napi::Value loadXmlFromString(const Napi::CallbackInfo& info);
43 | Napi::Value loadDtds(const Napi::CallbackInfo& info);
44 | // // static Napi::Value loadDtdsFromString(const Napi::CallbackInfo& info);
45 | Napi::Value loadSchemas(const Napi::CallbackInfo& info);
46 | Napi::Value validateAgainstDtds(const Napi::CallbackInfo& info);
47 | Napi::Value validateAgainstSchemas(const Napi::CallbackInfo& info);
48 | Napi::Value xpathSelect(const Napi::CallbackInfo& info);
49 | Napi::Value getDtd(const Napi::CallbackInfo& info);
50 | void freeXml(const Napi::CallbackInfo& info);
51 | void freeDtds(const Napi::CallbackInfo& info);
52 | void freeSchemas(const Napi::CallbackInfo& info);
53 | void clearAll(const Napi::CallbackInfo& info);
54 |
55 | // max error number util functions
56 | Napi::Value getMaxErrorNumber(const Napi::CallbackInfo& info);
57 | Napi::Value setMaxErrorNumber(const Napi::CallbackInfo& info);
58 | };
59 |
60 | #endif
61 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "node-libxml",
3 | "version": "5.0.6",
4 | "description": "Check Wellformed, DTD validity & get Xpath from pure node addons",
5 | "main": "index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git+https://github.com/jupitex/node-libxml.git"
9 | },
10 | "types": "index.d.ts",
11 | "scripts": {
12 | "test": "jest",
13 | "install": "node-gyp-build",
14 | "compile": "tsc",
15 | "build": "prebuildify --napi --tag-uv --tag-armv ",
16 | "build-mac-arm": "prebuildify --napi --platform=darwin --arch arm",
17 | "build-mac-x64": "prebuildify --napi --platform=darwin --arch x64",
18 | "build-mac-arm64": "prebuildify --napi --platform=darwin --arch arm64",
19 | "build-linux-arm": "prebuildify --napi --platform=linux --arch arm",
20 | "build-linux-x64": "prebuildify --napi --platform=linux --arch x64",
21 | "build-linux-arm64": "prebuildify --napi --platform=linux --arch arm64",
22 | "build-windows-arm": "prebuildify --napi --platform=win32 --arch arm",
23 | "build-windows-x64": "prebuildify --napi --platform=win32 --arch x64",
24 | "build-windows-arm64": "prebuildify --napi --platform=win32 --arch arm64",
25 | "build-all": "npm run compile && npm run build-mac-arm && npm run build-mac-x64 && npm run build-mac-arm64 && npm run build-linux-arm && npm run build-linux-x64 && npm run build-linux-arm64 && npm run build-windows-arm && npm run build-windows-x64 && npm run build-windows-arm64"
26 | },
27 | "author": "MatthD",
28 | "license": "MIT",
29 | "dependencies": {
30 | "node-addon-api": "^2.0.0",
31 | "node-gyp-build": "^4.8.4"
32 | },
33 | "files": [
34 | "prebuilds/**/*",
35 | "*.d.ts",
36 | "*.js",
37 | "*.h",
38 | "*.cpp",
39 | "vendor/libxml/**/*",
40 | "Readme.md",
41 | "binding.gyp",
42 | "package.json"
43 | ],
44 | "gypfile": true,
45 | "devDependencies": {
46 | "@types/chai": "^4.3.5",
47 | "@types/jest": "^29.5.1",
48 | "jest": "^29.5.0",
49 | "node-pre-gyp": "0.17.0",
50 | "prebuildify": "^6.0.1",
51 | "ts-jest": "^29.1.0",
52 | "typescript": "^5.0.4"
53 | },
54 | "bundleDependencies": [
55 | "node-pre-gyp"
56 | ]
57 | }
58 |
--------------------------------------------------------------------------------
/tests/data/test-bad-default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/data/test-bad-doctype.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/data/test-default-not-utf8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 | 23
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/data/test-default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 | 23
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/data/test-not-valid-dtd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Parthénogénese du poulpe en milieu sub-aquatique
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/data/test-not-wellformed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/data/test-unknown-doctype.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | trezaq
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/data/test-valid-schema.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 01714nam 2200325Ia 4500
5 | ocm11985480e
6 | OCoLC
7 | 19890711162336.0
8 | m g d
9 | cr bn |||a|bb|
10 | 850501s1684 enk s 00| | eng d
11 |
12 | CL0037000002
13 | ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/dtd/myBADdoctype.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tests/dtd/myBADdoctype2.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tests/dtd/mydoctype.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/dtd/mydoctype2.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/index.ts:
--------------------------------------------------------------------------------
1 | import { Libxml } from "../";
2 |
3 | let libXml = new Libxml();
4 | libXml.loadXml("test/data/test-default.xml");
5 |
--------------------------------------------------------------------------------
/tests/xsd/MARC21slim.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MARCXML: The MARC 21 XML Schema
6 | Prepared by Corey Keith
7 |
8 | May 21, 2002 - Version 1.0 - Initial Release
9 |
10 | **********************************************
11 | Changes.
12 |
13 | August 4, 2003 - Version 1.1 -
14 | Removed import of xml namespace and the use of xml:space="preserve" attributes on the leader and controlfields.
15 | Whitespace preservation in these subfields is accomplished by the use of xsd:whiteSpace value="preserve"
16 |
17 | May 21, 2009 - Version 1.2 -
18 | in subfieldcodeDataType the pattern
19 | "[\da-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}"
20 | changed to:
21 | "[\dA-Za-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}"
22 | i.e "A-Z" added after "[\d" before "a-z" to allow upper case. This change is for consistency with the documentation.
23 |
24 | ************************************************************
25 | This schema supports XML markup of MARC21 records as specified in the MARC documentation (see www.loc.gov). It allows tags with
26 | alphabetics and subfield codes that are symbols, neither of which are as yet used in the MARC 21 communications formats, but are
27 | allowed by MARC 21 for local data. The schema accommodates all types of MARC 21 records: bibliographic, holdings, bibliographic
28 | with embedded holdings, authority, classification, and community information.
29 |
30 |
31 |
32 |
33 | record is a top level container element for all of the field elements which compose the record
34 |
35 |
36 |
37 |
38 | collection is a top level container element for 0 or many records
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | MARC21 Leader, 24 bytes
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | MARC21 Fields 001-009
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | MARC21 Variable Data Fields 010-999
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/vendor/libxml/Copyright:
--------------------------------------------------------------------------------
1 | Except where otherwise noted in the source code (e.g. the files hash.c,
2 | list.c and the trio files, which are covered by a similar licence but
3 | with different Copyright notices) all the files are:
4 |
5 | Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is fur-
12 | nished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
19 | NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/vendor/libxml/SAX.c:
--------------------------------------------------------------------------------
1 | /*
2 | * SAX.c : Old SAX v1 handlers to build a tree.
3 | * Deprecated except for compatibility
4 | *
5 | * See Copyright for the status of this software.
6 | *
7 | * Daniel Veillard
8 | */
9 |
10 |
11 | #define IN_LIBXML
12 | #include "libxml.h"
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef LIBXML_LEGACY_ENABLED
32 | #ifdef LIBXML_SAX1_ENABLED
33 | /**
34 | * initxmlDefaultSAXHandler:
35 | * @hdlr: the SAX handler
36 | * @warning: flag if non-zero sets the handler warning procedure
37 | *
38 | * Initialize the default XML SAX version 1 handler
39 | * DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks
40 | */
41 | void
42 | initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
43 | {
44 |
45 | if(hdlr->initialized == 1)
46 | return;
47 |
48 | hdlr->internalSubset = xmlSAX2InternalSubset;
49 | hdlr->externalSubset = xmlSAX2ExternalSubset;
50 | hdlr->isStandalone = xmlSAX2IsStandalone;
51 | hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
52 | hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
53 | hdlr->resolveEntity = xmlSAX2ResolveEntity;
54 | hdlr->getEntity = xmlSAX2GetEntity;
55 | hdlr->getParameterEntity = xmlSAX2GetParameterEntity;
56 | hdlr->entityDecl = xmlSAX2EntityDecl;
57 | hdlr->attributeDecl = xmlSAX2AttributeDecl;
58 | hdlr->elementDecl = xmlSAX2ElementDecl;
59 | hdlr->notationDecl = xmlSAX2NotationDecl;
60 | hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl;
61 | hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
62 | hdlr->startDocument = xmlSAX2StartDocument;
63 | hdlr->endDocument = xmlSAX2EndDocument;
64 | hdlr->startElement = xmlSAX2StartElement;
65 | hdlr->endElement = xmlSAX2EndElement;
66 | hdlr->reference = xmlSAX2Reference;
67 | hdlr->characters = xmlSAX2Characters;
68 | hdlr->cdataBlock = xmlSAX2CDataBlock;
69 | hdlr->ignorableWhitespace = xmlSAX2Characters;
70 | hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
71 | if (warning == 0)
72 | hdlr->warning = NULL;
73 | else
74 | hdlr->warning = xmlParserWarning;
75 | hdlr->error = xmlParserError;
76 | hdlr->fatalError = xmlParserError;
77 |
78 | hdlr->initialized = 1;
79 | }
80 |
81 | #ifdef LIBXML_HTML_ENABLED
82 |
83 | /**
84 | * inithtmlDefaultSAXHandler:
85 | * @hdlr: the SAX handler
86 | *
87 | * Initialize the default HTML SAX version 1 handler
88 | * DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks
89 | */
90 | void
91 | inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
92 | {
93 | if(hdlr->initialized == 1)
94 | return;
95 |
96 | hdlr->internalSubset = xmlSAX2InternalSubset;
97 | hdlr->externalSubset = NULL;
98 | hdlr->isStandalone = NULL;
99 | hdlr->hasInternalSubset = NULL;
100 | hdlr->hasExternalSubset = NULL;
101 | hdlr->resolveEntity = NULL;
102 | hdlr->getEntity = xmlSAX2GetEntity;
103 | hdlr->getParameterEntity = NULL;
104 | hdlr->entityDecl = NULL;
105 | hdlr->attributeDecl = NULL;
106 | hdlr->elementDecl = NULL;
107 | hdlr->notationDecl = NULL;
108 | hdlr->unparsedEntityDecl = NULL;
109 | hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
110 | hdlr->startDocument = xmlSAX2StartDocument;
111 | hdlr->endDocument = xmlSAX2EndDocument;
112 | hdlr->startElement = xmlSAX2StartElement;
113 | hdlr->endElement = xmlSAX2EndElement;
114 | hdlr->reference = NULL;
115 | hdlr->characters = xmlSAX2Characters;
116 | hdlr->cdataBlock = xmlSAX2CDataBlock;
117 | hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
118 | hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
119 | hdlr->comment = xmlSAX2Comment;
120 | hdlr->warning = xmlParserWarning;
121 | hdlr->error = xmlParserError;
122 | hdlr->fatalError = xmlParserError;
123 |
124 | hdlr->initialized = 1;
125 | }
126 |
127 | #endif /* LIBXML_HTML_ENABLED */
128 |
129 | #ifdef LIBXML_DOCB_ENABLED
130 | /**
131 | * initdocbDefaultSAXHandler:
132 | * @hdlr: the SAX handler
133 | *
134 | * Initialize the default DocBook SAX version 1 handler
135 | * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
136 | */
137 | void
138 | initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
139 | {
140 | if(hdlr->initialized == 1)
141 | return;
142 |
143 | hdlr->internalSubset = xmlSAX2InternalSubset;
144 | hdlr->externalSubset = NULL;
145 | hdlr->isStandalone = xmlSAX2IsStandalone;
146 | hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
147 | hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
148 | hdlr->resolveEntity = xmlSAX2ResolveEntity;
149 | hdlr->getEntity = xmlSAX2GetEntity;
150 | hdlr->getParameterEntity = NULL;
151 | hdlr->entityDecl = xmlSAX2EntityDecl;
152 | hdlr->attributeDecl = NULL;
153 | hdlr->elementDecl = NULL;
154 | hdlr->notationDecl = NULL;
155 | hdlr->unparsedEntityDecl = NULL;
156 | hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
157 | hdlr->startDocument = xmlSAX2StartDocument;
158 | hdlr->endDocument = xmlSAX2EndDocument;
159 | hdlr->startElement = xmlSAX2StartElement;
160 | hdlr->endElement = xmlSAX2EndElement;
161 | hdlr->reference = xmlSAX2Reference;
162 | hdlr->characters = xmlSAX2Characters;
163 | hdlr->cdataBlock = NULL;
164 | hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
165 | hdlr->processingInstruction = NULL;
166 | hdlr->comment = xmlSAX2Comment;
167 | hdlr->warning = xmlParserWarning;
168 | hdlr->error = xmlParserError;
169 | hdlr->fatalError = xmlParserError;
170 |
171 | hdlr->initialized = 1;
172 | }
173 |
174 | #endif /* LIBXML_DOCB_ENABLED */
175 |
176 | #endif /* LIBXML_SAX1_ENABLED */
177 |
178 | #define bottom_SAX
179 | #include "elfgcchack.h"
180 | #endif /* LIBXML_LEGACY_ENABLED */
181 |
--------------------------------------------------------------------------------
/vendor/libxml/buf.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Internal Interfaces for memory buffers in libxml2
3 | * Description: this module describes most of the new xmlBuf buffer
4 | * entry points, those are private routines, with a
5 | * few exceptions exported in tree.h. This was added
6 | * in 2.9.0.
7 | *
8 | * Copy: See Copyright for the status of this software.
9 | *
10 | * Author: Daniel Veillard
11 | */
12 |
13 | #ifndef __XML_BUF_H__
14 | #define __XML_BUF_H__
15 |
16 | #include
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 |
22 | xmlBufPtr xmlBufCreate(void);
23 | xmlBufPtr xmlBufCreateSize(size_t size);
24 | xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
25 |
26 | int xmlBufSetAllocationScheme(xmlBufPtr buf,
27 | xmlBufferAllocationScheme scheme);
28 | int xmlBufGetAllocationScheme(xmlBufPtr buf);
29 |
30 | void xmlBufFree(xmlBufPtr buf);
31 | void xmlBufEmpty(xmlBufPtr buf);
32 |
33 | /* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
34 | int xmlBufGrow(xmlBufPtr buf, int len);
35 | int xmlBufInflate(xmlBufPtr buf, size_t len);
36 | int xmlBufResize(xmlBufPtr buf, size_t len);
37 |
38 | int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
39 | int xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len);
40 | int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
41 | int xmlBufCCat(xmlBufPtr buf, const char *str);
42 | int xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string);
43 | int xmlBufWriteChar(xmlBufPtr buf, const char *string);
44 | int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
45 |
46 | size_t xmlBufAvail(const xmlBufPtr buf);
47 | size_t xmlBufLength(const xmlBufPtr buf);
48 | /* size_t xmlBufUse(const xmlBufPtr buf); */
49 | int xmlBufIsEmpty(const xmlBufPtr buf);
50 | int xmlBufAddLen(xmlBufPtr buf, size_t len);
51 | int xmlBufErase(xmlBufPtr buf, size_t len);
52 |
53 | /* const xmlChar * xmlBufContent(const xmlBuf *buf); */
54 | /* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
55 |
56 | xmlChar * xmlBufDetach(xmlBufPtr buf);
57 |
58 | size_t xmlBufDump(FILE *file, xmlBufPtr buf);
59 |
60 | xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
61 | xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
62 | int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
63 |
64 | int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
65 | size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
66 | int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
67 | size_t base, size_t cur);
68 | #ifdef __cplusplus
69 | }
70 | #endif
71 | #endif /* __XML_BUF_H__ */
72 |
73 |
--------------------------------------------------------------------------------
/vendor/libxml/enc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Internal Interfaces for encoding in libxml2
3 | * Description: this module describes a few interfaces which were
4 | * addded along with the API changes in 2.9.0
5 | * those are private routines at this point
6 | *
7 | * Copy: See Copyright for the status of this software.
8 | *
9 | * Author: Daniel Veillard
10 | */
11 |
12 | #ifndef __XML_ENC_H__
13 | #define __XML_ENC_H__
14 |
15 | #include
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 |
21 | int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
22 | xmlBufferPtr in, int len);
23 | int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
24 | int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
25 | int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
26 |
27 | #ifdef __cplusplus
28 | }
29 | #endif
30 | #endif /* __XML_ENC_H__ */
31 |
32 |
33 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/DOCBparser.h:
--------------------------------------------------------------------------------
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
14 |
15 | #ifdef LIBXML_DOCB_ENABLED
16 |
17 | #include
18 | #include
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 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/HTMLtree.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: specific APIs to process HTML tree, especially serialization
3 | * Description: this module implements a few function needed to process
4 | * tree in an HTML specific way.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __HTML_TREE_H__
12 | #define __HTML_TREE_H__
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #ifdef LIBXML_HTML_ENABLED
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 |
26 | /**
27 | * HTML_TEXT_NODE:
28 | *
29 | * Macro. A text node in a HTML document is really implemented
30 | * the same way as a text node in an XML document.
31 | */
32 | #define HTML_TEXT_NODE XML_TEXT_NODE
33 | /**
34 | * HTML_ENTITY_REF_NODE:
35 | *
36 | * Macro. An entity reference in a HTML document is really implemented
37 | * the same way as an entity reference in an XML document.
38 | */
39 | #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
40 | /**
41 | * HTML_COMMENT_NODE:
42 | *
43 | * Macro. A comment in a HTML document is really implemented
44 | * the same way as a comment in an XML document.
45 | */
46 | #define HTML_COMMENT_NODE XML_COMMENT_NODE
47 | /**
48 | * HTML_PRESERVE_NODE:
49 | *
50 | * Macro. A preserved node in a HTML document is really implemented
51 | * the same way as a CDATA section in an XML document.
52 | */
53 | #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
54 | /**
55 | * HTML_PI_NODE:
56 | *
57 | * Macro. A processing instruction in a HTML document is really implemented
58 | * the same way as a processing instruction in an XML document.
59 | */
60 | #define HTML_PI_NODE XML_PI_NODE
61 |
62 | XMLPUBFUN htmlDocPtr XMLCALL
63 | htmlNewDoc (const xmlChar *URI,
64 | const xmlChar *ExternalID);
65 | XMLPUBFUN htmlDocPtr XMLCALL
66 | htmlNewDocNoDtD (const xmlChar *URI,
67 | const xmlChar *ExternalID);
68 | XMLPUBFUN const xmlChar * XMLCALL
69 | htmlGetMetaEncoding (htmlDocPtr doc);
70 | XMLPUBFUN int XMLCALL
71 | htmlSetMetaEncoding (htmlDocPtr doc,
72 | const xmlChar *encoding);
73 | #ifdef LIBXML_OUTPUT_ENABLED
74 | XMLPUBFUN void XMLCALL
75 | htmlDocDumpMemory (xmlDocPtr cur,
76 | xmlChar **mem,
77 | int *size);
78 | XMLPUBFUN void XMLCALL
79 | htmlDocDumpMemoryFormat (xmlDocPtr cur,
80 | xmlChar **mem,
81 | int *size,
82 | int format);
83 | XMLPUBFUN int XMLCALL
84 | htmlDocDump (FILE *f,
85 | xmlDocPtr cur);
86 | XMLPUBFUN int XMLCALL
87 | htmlSaveFile (const char *filename,
88 | xmlDocPtr cur);
89 | XMLPUBFUN int XMLCALL
90 | htmlNodeDump (xmlBufferPtr buf,
91 | xmlDocPtr doc,
92 | xmlNodePtr cur);
93 | XMLPUBFUN void XMLCALL
94 | htmlNodeDumpFile (FILE *out,
95 | xmlDocPtr doc,
96 | xmlNodePtr cur);
97 | XMLPUBFUN int XMLCALL
98 | htmlNodeDumpFileFormat (FILE *out,
99 | xmlDocPtr doc,
100 | xmlNodePtr cur,
101 | const char *encoding,
102 | int format);
103 | XMLPUBFUN int XMLCALL
104 | htmlSaveFileEnc (const char *filename,
105 | xmlDocPtr cur,
106 | const char *encoding);
107 | XMLPUBFUN int XMLCALL
108 | htmlSaveFileFormat (const char *filename,
109 | xmlDocPtr cur,
110 | const char *encoding,
111 | int format);
112 |
113 | XMLPUBFUN void XMLCALL
114 | htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
115 | xmlDocPtr doc,
116 | xmlNodePtr cur,
117 | const char *encoding,
118 | int format);
119 | XMLPUBFUN void XMLCALL
120 | htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
121 | xmlDocPtr cur,
122 | const char *encoding);
123 | XMLPUBFUN void XMLCALL
124 | htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
125 | xmlDocPtr cur,
126 | const char *encoding,
127 | int format);
128 | XMLPUBFUN void XMLCALL
129 | htmlNodeDumpOutput (xmlOutputBufferPtr buf,
130 | xmlDocPtr doc,
131 | xmlNodePtr cur,
132 | const char *encoding);
133 |
134 | #endif /* LIBXML_OUTPUT_ENABLED */
135 |
136 | XMLPUBFUN int XMLCALL
137 | htmlIsBooleanAttr (const xmlChar *name);
138 |
139 |
140 | #ifdef __cplusplus
141 | }
142 | #endif
143 |
144 | #endif /* LIBXML_HTML_ENABLED */
145 |
146 | #endif /* __HTML_TREE_H__ */
147 |
148 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Process this file with automake to produce Makefile.in
2 |
3 | xmlincdir = $(includedir)/libxml2/libxml
4 |
5 | xmlinc_HEADERS = \
6 | SAX.h \
7 | entities.h \
8 | encoding.h \
9 | parser.h \
10 | parserInternals.h \
11 | xmlerror.h \
12 | HTMLparser.h \
13 | HTMLtree.h \
14 | debugXML.h \
15 | tree.h \
16 | list.h \
17 | hash.h \
18 | xpath.h \
19 | xpathInternals.h \
20 | xpointer.h \
21 | xinclude.h \
22 | xmlIO.h \
23 | xmlmemory.h \
24 | nanohttp.h \
25 | nanoftp.h \
26 | uri.h \
27 | valid.h \
28 | xlink.h \
29 | xmlversion.h \
30 | DOCBparser.h \
31 | catalog.h \
32 | threads.h \
33 | globals.h \
34 | c14n.h \
35 | xmlautomata.h \
36 | xmlregexp.h \
37 | xmlmodule.h \
38 | xmlschemas.h \
39 | schemasInternals.h \
40 | xmlschemastypes.h \
41 | xmlstring.h \
42 | xmlunicode.h \
43 | xmlreader.h \
44 | relaxng.h \
45 | dict.h \
46 | SAX2.h \
47 | xmlexports.h \
48 | xmlwriter.h \
49 | chvalid.h \
50 | pattern.h \
51 | xmlsave.h \
52 | schematron.h
53 |
54 | EXTRA_DIST = xmlversion.h.in
55 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/SAX.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Old SAX version 1 handler, deprecated
3 | * Description: DEPRECATED set of SAX version 1 interfaces used to
4 | * build the DOM tree.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 |
12 | #ifndef __XML_SAX_H__
13 | #define __XML_SAX_H__
14 |
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | #ifdef LIBXML_LEGACY_ENABLED
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 | XMLPUBFUN const xmlChar * XMLCALL
27 | getPublicId (void *ctx);
28 | XMLPUBFUN const xmlChar * XMLCALL
29 | getSystemId (void *ctx);
30 | XMLPUBFUN void XMLCALL
31 | setDocumentLocator (void *ctx,
32 | xmlSAXLocatorPtr loc);
33 |
34 | XMLPUBFUN int XMLCALL
35 | getLineNumber (void *ctx);
36 | XMLPUBFUN int XMLCALL
37 | getColumnNumber (void *ctx);
38 |
39 | XMLPUBFUN int XMLCALL
40 | isStandalone (void *ctx);
41 | XMLPUBFUN int XMLCALL
42 | hasInternalSubset (void *ctx);
43 | XMLPUBFUN int XMLCALL
44 | hasExternalSubset (void *ctx);
45 |
46 | XMLPUBFUN void XMLCALL
47 | internalSubset (void *ctx,
48 | const xmlChar *name,
49 | const xmlChar *ExternalID,
50 | const xmlChar *SystemID);
51 | XMLPUBFUN void XMLCALL
52 | externalSubset (void *ctx,
53 | const xmlChar *name,
54 | const xmlChar *ExternalID,
55 | const xmlChar *SystemID);
56 | XMLPUBFUN xmlEntityPtr XMLCALL
57 | getEntity (void *ctx,
58 | const xmlChar *name);
59 | XMLPUBFUN xmlEntityPtr XMLCALL
60 | getParameterEntity (void *ctx,
61 | const xmlChar *name);
62 | XMLPUBFUN xmlParserInputPtr XMLCALL
63 | resolveEntity (void *ctx,
64 | const xmlChar *publicId,
65 | const xmlChar *systemId);
66 |
67 | XMLPUBFUN void XMLCALL
68 | entityDecl (void *ctx,
69 | const xmlChar *name,
70 | int type,
71 | const xmlChar *publicId,
72 | const xmlChar *systemId,
73 | xmlChar *content);
74 | XMLPUBFUN void XMLCALL
75 | attributeDecl (void *ctx,
76 | const xmlChar *elem,
77 | const xmlChar *fullname,
78 | int type,
79 | int def,
80 | const xmlChar *defaultValue,
81 | xmlEnumerationPtr tree);
82 | XMLPUBFUN void XMLCALL
83 | elementDecl (void *ctx,
84 | const xmlChar *name,
85 | int type,
86 | xmlElementContentPtr content);
87 | XMLPUBFUN void XMLCALL
88 | notationDecl (void *ctx,
89 | const xmlChar *name,
90 | const xmlChar *publicId,
91 | const xmlChar *systemId);
92 | XMLPUBFUN void XMLCALL
93 | unparsedEntityDecl (void *ctx,
94 | const xmlChar *name,
95 | const xmlChar *publicId,
96 | const xmlChar *systemId,
97 | const xmlChar *notationName);
98 |
99 | XMLPUBFUN void XMLCALL
100 | startDocument (void *ctx);
101 | XMLPUBFUN void XMLCALL
102 | endDocument (void *ctx);
103 | XMLPUBFUN void XMLCALL
104 | attribute (void *ctx,
105 | const xmlChar *fullname,
106 | const xmlChar *value);
107 | XMLPUBFUN void XMLCALL
108 | startElement (void *ctx,
109 | const xmlChar *fullname,
110 | const xmlChar **atts);
111 | XMLPUBFUN void XMLCALL
112 | endElement (void *ctx,
113 | const xmlChar *name);
114 | XMLPUBFUN void XMLCALL
115 | reference (void *ctx,
116 | const xmlChar *name);
117 | XMLPUBFUN void XMLCALL
118 | characters (void *ctx,
119 | const xmlChar *ch,
120 | int len);
121 | XMLPUBFUN void XMLCALL
122 | ignorableWhitespace (void *ctx,
123 | const xmlChar *ch,
124 | int len);
125 | XMLPUBFUN void XMLCALL
126 | processingInstruction (void *ctx,
127 | const xmlChar *target,
128 | const xmlChar *data);
129 | XMLPUBFUN void XMLCALL
130 | globalNamespace (void *ctx,
131 | const xmlChar *href,
132 | const xmlChar *prefix);
133 | XMLPUBFUN void XMLCALL
134 | setNamespace (void *ctx,
135 | const xmlChar *name);
136 | XMLPUBFUN xmlNsPtr XMLCALL
137 | getNamespace (void *ctx);
138 | XMLPUBFUN int XMLCALL
139 | checkNamespace (void *ctx,
140 | xmlChar *nameSpace);
141 | XMLPUBFUN void XMLCALL
142 | namespaceDecl (void *ctx,
143 | const xmlChar *href,
144 | const xmlChar *prefix);
145 | XMLPUBFUN void XMLCALL
146 | comment (void *ctx,
147 | const xmlChar *value);
148 | XMLPUBFUN void XMLCALL
149 | cdataBlock (void *ctx,
150 | const xmlChar *value,
151 | int len);
152 |
153 | #ifdef LIBXML_SAX1_ENABLED
154 | XMLPUBFUN void XMLCALL
155 | initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
156 | int warning);
157 | #ifdef LIBXML_HTML_ENABLED
158 | XMLPUBFUN void XMLCALL
159 | inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
160 | #endif
161 | #ifdef LIBXML_DOCB_ENABLED
162 | XMLPUBFUN void XMLCALL
163 | initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
164 | #endif
165 | #endif /* LIBXML_SAX1_ENABLED */
166 |
167 | #ifdef __cplusplus
168 | }
169 | #endif
170 |
171 | #endif /* LIBXML_LEGACY_ENABLED */
172 |
173 | #endif /* __XML_SAX_H__ */
174 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/SAX2.h:
--------------------------------------------------------------------------------
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 |
11 |
12 | #ifndef __XML_SAX2_H__
13 | #define __XML_SAX2_H__
14 |
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 | XMLPUBFUN const xmlChar * XMLCALL
25 | xmlSAX2GetPublicId (void *ctx);
26 | XMLPUBFUN const xmlChar * XMLCALL
27 | xmlSAX2GetSystemId (void *ctx);
28 | XMLPUBFUN void XMLCALL
29 | xmlSAX2SetDocumentLocator (void *ctx,
30 | xmlSAXLocatorPtr loc);
31 |
32 | XMLPUBFUN int XMLCALL
33 | xmlSAX2GetLineNumber (void *ctx);
34 | XMLPUBFUN int XMLCALL
35 | xmlSAX2GetColumnNumber (void *ctx);
36 |
37 | XMLPUBFUN int XMLCALL
38 | xmlSAX2IsStandalone (void *ctx);
39 | XMLPUBFUN int XMLCALL
40 | xmlSAX2HasInternalSubset (void *ctx);
41 | XMLPUBFUN int XMLCALL
42 | xmlSAX2HasExternalSubset (void *ctx);
43 |
44 | XMLPUBFUN void XMLCALL
45 | xmlSAX2InternalSubset (void *ctx,
46 | const xmlChar *name,
47 | const xmlChar *ExternalID,
48 | const xmlChar *SystemID);
49 | XMLPUBFUN void XMLCALL
50 | xmlSAX2ExternalSubset (void *ctx,
51 | const xmlChar *name,
52 | const xmlChar *ExternalID,
53 | const xmlChar *SystemID);
54 | XMLPUBFUN xmlEntityPtr XMLCALL
55 | xmlSAX2GetEntity (void *ctx,
56 | const xmlChar *name);
57 | XMLPUBFUN xmlEntityPtr XMLCALL
58 | xmlSAX2GetParameterEntity (void *ctx,
59 | const xmlChar *name);
60 | XMLPUBFUN xmlParserInputPtr XMLCALL
61 | xmlSAX2ResolveEntity (void *ctx,
62 | const xmlChar *publicId,
63 | const xmlChar *systemId);
64 |
65 | XMLPUBFUN void XMLCALL
66 | xmlSAX2EntityDecl (void *ctx,
67 | const xmlChar *name,
68 | int type,
69 | const xmlChar *publicId,
70 | const xmlChar *systemId,
71 | xmlChar *content);
72 | XMLPUBFUN void XMLCALL
73 | xmlSAX2AttributeDecl (void *ctx,
74 | const xmlChar *elem,
75 | const xmlChar *fullname,
76 | int type,
77 | int def,
78 | const xmlChar *defaultValue,
79 | xmlEnumerationPtr tree);
80 | XMLPUBFUN void XMLCALL
81 | xmlSAX2ElementDecl (void *ctx,
82 | const xmlChar *name,
83 | int type,
84 | xmlElementContentPtr content);
85 | XMLPUBFUN void XMLCALL
86 | xmlSAX2NotationDecl (void *ctx,
87 | const xmlChar *name,
88 | const xmlChar *publicId,
89 | const xmlChar *systemId);
90 | XMLPUBFUN void XMLCALL
91 | xmlSAX2UnparsedEntityDecl (void *ctx,
92 | const xmlChar *name,
93 | const xmlChar *publicId,
94 | const xmlChar *systemId,
95 | const xmlChar *notationName);
96 |
97 | XMLPUBFUN void XMLCALL
98 | xmlSAX2StartDocument (void *ctx);
99 | XMLPUBFUN void XMLCALL
100 | xmlSAX2EndDocument (void *ctx);
101 | #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
102 | defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
103 | defined(LIBXML_LEGACY_ENABLED)
104 | XMLPUBFUN void XMLCALL
105 | xmlSAX2StartElement (void *ctx,
106 | const xmlChar *fullname,
107 | const xmlChar **atts);
108 | XMLPUBFUN void XMLCALL
109 | xmlSAX2EndElement (void *ctx,
110 | const xmlChar *name);
111 | #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
112 | XMLPUBFUN void XMLCALL
113 | xmlSAX2StartElementNs (void *ctx,
114 | const xmlChar *localname,
115 | const xmlChar *prefix,
116 | const xmlChar *URI,
117 | int nb_namespaces,
118 | const xmlChar **namespaces,
119 | int nb_attributes,
120 | int nb_defaulted,
121 | const xmlChar **attributes);
122 | XMLPUBFUN void XMLCALL
123 | xmlSAX2EndElementNs (void *ctx,
124 | const xmlChar *localname,
125 | const xmlChar *prefix,
126 | const xmlChar *URI);
127 | XMLPUBFUN void XMLCALL
128 | xmlSAX2Reference (void *ctx,
129 | const xmlChar *name);
130 | XMLPUBFUN void XMLCALL
131 | xmlSAX2Characters (void *ctx,
132 | const xmlChar *ch,
133 | int len);
134 | XMLPUBFUN void XMLCALL
135 | xmlSAX2IgnorableWhitespace (void *ctx,
136 | const xmlChar *ch,
137 | int len);
138 | XMLPUBFUN void XMLCALL
139 | xmlSAX2ProcessingInstruction (void *ctx,
140 | const xmlChar *target,
141 | const xmlChar *data);
142 | XMLPUBFUN void XMLCALL
143 | xmlSAX2Comment (void *ctx,
144 | const xmlChar *value);
145 | XMLPUBFUN void XMLCALL
146 | xmlSAX2CDataBlock (void *ctx,
147 | const xmlChar *value,
148 | int len);
149 |
150 | #ifdef LIBXML_SAX1_ENABLED
151 | XMLPUBFUN int XMLCALL
152 | xmlSAXDefaultVersion (int version);
153 | #endif /* LIBXML_SAX1_ENABLED */
154 |
155 | XMLPUBFUN int XMLCALL
156 | xmlSAXVersion (xmlSAXHandler *hdlr,
157 | int version);
158 | XMLPUBFUN void XMLCALL
159 | xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
160 | int warning);
161 | #ifdef LIBXML_HTML_ENABLED
162 | XMLPUBFUN void XMLCALL
163 | xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
164 | XMLPUBFUN void XMLCALL
165 | htmlDefaultSAXHandlerInit (void);
166 | #endif
167 | #ifdef LIBXML_DOCB_ENABLED
168 | XMLPUBFUN void XMLCALL
169 | xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
170 | XMLPUBFUN void XMLCALL
171 | docbDefaultSAXHandlerInit (void);
172 | #endif
173 | XMLPUBFUN void XMLCALL
174 | xmlDefaultSAXHandlerInit (void);
175 | #ifdef __cplusplus
176 | }
177 | #endif
178 | #endif /* __XML_SAX2_H__ */
179 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/c14n.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Provide Canonical XML and Exclusive XML Canonicalization
3 | * Description: the c14n modules provides a
4 | *
5 | * "Canonical XML" implementation
6 | * http://www.w3.org/TR/xml-c14n
7 | *
8 | * and an
9 | *
10 | * "Exclusive XML Canonicalization" implementation
11 | * http://www.w3.org/TR/xml-exc-c14n
12 |
13 | * Copy: See Copyright for the status of this software.
14 | *
15 | * Author: Aleksey Sanin
16 | */
17 | #ifndef __XML_C14N_H__
18 | #define __XML_C14N_H__
19 | #ifdef LIBXML_C14N_ENABLED
20 | #ifdef LIBXML_OUTPUT_ENABLED
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif /* __cplusplus */
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | /*
31 | * XML Canonicazation
32 | * http://www.w3.org/TR/xml-c14n
33 | *
34 | * Exclusive XML Canonicazation
35 | * http://www.w3.org/TR/xml-exc-c14n
36 | *
37 | * Canonical form of an XML document could be created if and only if
38 | * a) default attributes (if any) are added to all nodes
39 | * b) all character and parsed entity references are resolved
40 | * In order to achive this in libxml2 the document MUST be loaded with
41 | * following global setings:
42 | *
43 | * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
44 | * xmlSubstituteEntitiesDefault(1);
45 | *
46 | * or corresponding parser context setting:
47 | * xmlParserCtxtPtr ctxt;
48 | *
49 | * ...
50 | * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
51 | * ctxt->replaceEntities = 1;
52 | * ...
53 | */
54 |
55 | /*
56 | * xmlC14NMode:
57 | *
58 | * Predefined values for C14N modes
59 | *
60 | */
61 | typedef enum {
62 | XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
63 | XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
64 | XML_C14N_1_1 = 2 /* C14N 1.1 spec */
65 | } xmlC14NMode;
66 |
67 | XMLPUBFUN int XMLCALL
68 | xmlC14NDocSaveTo (xmlDocPtr doc,
69 | xmlNodeSetPtr nodes,
70 | int mode, /* a xmlC14NMode */
71 | xmlChar **inclusive_ns_prefixes,
72 | int with_comments,
73 | xmlOutputBufferPtr buf);
74 |
75 | XMLPUBFUN int XMLCALL
76 | xmlC14NDocDumpMemory (xmlDocPtr doc,
77 | xmlNodeSetPtr nodes,
78 | int mode, /* a xmlC14NMode */
79 | xmlChar **inclusive_ns_prefixes,
80 | int with_comments,
81 | xmlChar **doc_txt_ptr);
82 |
83 | XMLPUBFUN int XMLCALL
84 | xmlC14NDocSave (xmlDocPtr doc,
85 | xmlNodeSetPtr nodes,
86 | int mode, /* a xmlC14NMode */
87 | xmlChar **inclusive_ns_prefixes,
88 | int with_comments,
89 | const char* filename,
90 | int compression);
91 |
92 |
93 | /**
94 | * This is the core C14N function
95 | */
96 | /**
97 | * xmlC14NIsVisibleCallback:
98 | * @user_data: user data
99 | * @node: the curent node
100 | * @parent: the parent node
101 | *
102 | * Signature for a C14N callback on visible nodes
103 | *
104 | * Returns 1 if the node should be included
105 | */
106 | typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
107 | xmlNodePtr node,
108 | xmlNodePtr parent);
109 |
110 | XMLPUBFUN int XMLCALL
111 | xmlC14NExecute (xmlDocPtr doc,
112 | xmlC14NIsVisibleCallback is_visible_callback,
113 | void* user_data,
114 | int mode, /* a xmlC14NMode */
115 | xmlChar **inclusive_ns_prefixes,
116 | int with_comments,
117 | xmlOutputBufferPtr buf);
118 |
119 | #ifdef __cplusplus
120 | }
121 | #endif /* __cplusplus */
122 |
123 | #endif /* LIBXML_OUTPUT_ENABLED */
124 | #endif /* LIBXML_C14N_ENABLED */
125 | #endif /* __XML_C14N_H__ */
126 |
127 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/catalog.h:
--------------------------------------------------------------------------------
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
21 |
22 | #include
23 | #include
24 | #include
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 Instuction 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 XMLCALL
70 | xmlNewCatalog (int sgml);
71 | XMLPUBFUN xmlCatalogPtr XMLCALL
72 | xmlLoadACatalog (const char *filename);
73 | XMLPUBFUN xmlCatalogPtr XMLCALL
74 | xmlLoadSGMLSuperCatalog (const char *filename);
75 | XMLPUBFUN int XMLCALL
76 | xmlConvertSGMLCatalog (xmlCatalogPtr catal);
77 | XMLPUBFUN int XMLCALL
78 | xmlACatalogAdd (xmlCatalogPtr catal,
79 | const xmlChar *type,
80 | const xmlChar *orig,
81 | const xmlChar *replace);
82 | XMLPUBFUN int XMLCALL
83 | xmlACatalogRemove (xmlCatalogPtr catal,
84 | const xmlChar *value);
85 | XMLPUBFUN xmlChar * XMLCALL
86 | xmlACatalogResolve (xmlCatalogPtr catal,
87 | const xmlChar *pubID,
88 | const xmlChar *sysID);
89 | XMLPUBFUN xmlChar * XMLCALL
90 | xmlACatalogResolveSystem(xmlCatalogPtr catal,
91 | const xmlChar *sysID);
92 | XMLPUBFUN xmlChar * XMLCALL
93 | xmlACatalogResolvePublic(xmlCatalogPtr catal,
94 | const xmlChar *pubID);
95 | XMLPUBFUN xmlChar * XMLCALL
96 | xmlACatalogResolveURI (xmlCatalogPtr catal,
97 | const xmlChar *URI);
98 | #ifdef LIBXML_OUTPUT_ENABLED
99 | XMLPUBFUN void XMLCALL
100 | xmlACatalogDump (xmlCatalogPtr catal,
101 | FILE *out);
102 | #endif /* LIBXML_OUTPUT_ENABLED */
103 | XMLPUBFUN void XMLCALL
104 | xmlFreeCatalog (xmlCatalogPtr catal);
105 | XMLPUBFUN int XMLCALL
106 | xmlCatalogIsEmpty (xmlCatalogPtr catal);
107 |
108 | /*
109 | * Global operations.
110 | */
111 | XMLPUBFUN void XMLCALL
112 | xmlInitializeCatalog (void);
113 | XMLPUBFUN int XMLCALL
114 | xmlLoadCatalog (const char *filename);
115 | XMLPUBFUN void XMLCALL
116 | xmlLoadCatalogs (const char *paths);
117 | XMLPUBFUN void XMLCALL
118 | xmlCatalogCleanup (void);
119 | #ifdef LIBXML_OUTPUT_ENABLED
120 | XMLPUBFUN void XMLCALL
121 | xmlCatalogDump (FILE *out);
122 | #endif /* LIBXML_OUTPUT_ENABLED */
123 | XMLPUBFUN xmlChar * XMLCALL
124 | xmlCatalogResolve (const xmlChar *pubID,
125 | const xmlChar *sysID);
126 | XMLPUBFUN xmlChar * XMLCALL
127 | xmlCatalogResolveSystem (const xmlChar *sysID);
128 | XMLPUBFUN xmlChar * XMLCALL
129 | xmlCatalogResolvePublic (const xmlChar *pubID);
130 | XMLPUBFUN xmlChar * XMLCALL
131 | xmlCatalogResolveURI (const xmlChar *URI);
132 | XMLPUBFUN int XMLCALL
133 | xmlCatalogAdd (const xmlChar *type,
134 | const xmlChar *orig,
135 | const xmlChar *replace);
136 | XMLPUBFUN int XMLCALL
137 | xmlCatalogRemove (const xmlChar *value);
138 | XMLPUBFUN xmlDocPtr XMLCALL
139 | xmlParseCatalogFile (const char *filename);
140 | XMLPUBFUN int XMLCALL
141 | xmlCatalogConvert (void);
142 |
143 | /*
144 | * Strictly minimal interfaces for per-document catalogs used
145 | * by the parser.
146 | */
147 | XMLPUBFUN void XMLCALL
148 | xmlCatalogFreeLocal (void *catalogs);
149 | XMLPUBFUN void * XMLCALL
150 | xmlCatalogAddLocal (void *catalogs,
151 | const xmlChar *URL);
152 | XMLPUBFUN xmlChar * XMLCALL
153 | xmlCatalogLocalResolve (void *catalogs,
154 | const xmlChar *pubID,
155 | const xmlChar *sysID);
156 | XMLPUBFUN xmlChar * XMLCALL
157 | xmlCatalogLocalResolveURI(void *catalogs,
158 | const xmlChar *URI);
159 | /*
160 | * Preference settings.
161 | */
162 | XMLPUBFUN int XMLCALL
163 | xmlCatalogSetDebug (int level);
164 | XMLPUBFUN xmlCatalogPrefer XMLCALL
165 | xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
166 | XMLPUBFUN void XMLCALL
167 | xmlCatalogSetDefaults (xmlCatalogAllow allow);
168 | XMLPUBFUN xmlCatalogAllow XMLCALL
169 | xmlCatalogGetDefaults (void);
170 |
171 |
172 | /* DEPRECATED interfaces */
173 | XMLPUBFUN const xmlChar * XMLCALL
174 | xmlCatalogGetSystem (const xmlChar *sysID);
175 | XMLPUBFUN const xmlChar * XMLCALL
176 | xmlCatalogGetPublic (const xmlChar *pubID);
177 |
178 | #ifdef __cplusplus
179 | }
180 | #endif
181 | #endif /* LIBXML_CATALOG_ENABLED */
182 | #endif /* __XML_CATALOG_H__ */
183 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/chvalid.h:
--------------------------------------------------------------------------------
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
12 | */
13 |
14 | #ifndef __XML_CHVALID_H__
15 | #define __XML_CHVALID_H__
16 |
17 | #include
18 | #include
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 XMLCALL
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 XMLCALL
211 | xmlIsBaseChar(unsigned int ch);
212 | XMLPUBFUN int XMLCALL
213 | xmlIsBlank(unsigned int ch);
214 | XMLPUBFUN int XMLCALL
215 | xmlIsChar(unsigned int ch);
216 | XMLPUBFUN int XMLCALL
217 | xmlIsCombining(unsigned int ch);
218 | XMLPUBFUN int XMLCALL
219 | xmlIsDigit(unsigned int ch);
220 | XMLPUBFUN int XMLCALL
221 | xmlIsExtender(unsigned int ch);
222 | XMLPUBFUN int XMLCALL
223 | xmlIsIdeographic(unsigned int ch);
224 | XMLPUBFUN int XMLCALL
225 | xmlIsPubidChar(unsigned int ch);
226 |
227 | #ifdef __cplusplus
228 | }
229 | #endif
230 | #endif /* __XML_CHVALID_H__ */
231 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/debugXML.h:
--------------------------------------------------------------------------------
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
14 | #include
15 | #include
16 |
17 | #ifdef LIBXML_DEBUG_ENABLED
18 |
19 | #include
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | /*
26 | * The standard Dump routines.
27 | */
28 | XMLPUBFUN void XMLCALL
29 | xmlDebugDumpString (FILE *output,
30 | const xmlChar *str);
31 | XMLPUBFUN void XMLCALL
32 | xmlDebugDumpAttr (FILE *output,
33 | xmlAttrPtr attr,
34 | int depth);
35 | XMLPUBFUN void XMLCALL
36 | xmlDebugDumpAttrList (FILE *output,
37 | xmlAttrPtr attr,
38 | int depth);
39 | XMLPUBFUN void XMLCALL
40 | xmlDebugDumpOneNode (FILE *output,
41 | xmlNodePtr node,
42 | int depth);
43 | XMLPUBFUN void XMLCALL
44 | xmlDebugDumpNode (FILE *output,
45 | xmlNodePtr node,
46 | int depth);
47 | XMLPUBFUN void XMLCALL
48 | xmlDebugDumpNodeList (FILE *output,
49 | xmlNodePtr node,
50 | int depth);
51 | XMLPUBFUN void XMLCALL
52 | xmlDebugDumpDocumentHead(FILE *output,
53 | xmlDocPtr doc);
54 | XMLPUBFUN void XMLCALL
55 | xmlDebugDumpDocument (FILE *output,
56 | xmlDocPtr doc);
57 | XMLPUBFUN void XMLCALL
58 | xmlDebugDumpDTD (FILE *output,
59 | xmlDtdPtr dtd);
60 | XMLPUBFUN void XMLCALL
61 | xmlDebugDumpEntities (FILE *output,
62 | xmlDocPtr doc);
63 |
64 | /****************************************************************
65 | * *
66 | * Checking routines *
67 | * *
68 | ****************************************************************/
69 |
70 | XMLPUBFUN int XMLCALL
71 | xmlDebugCheckDocument (FILE * output,
72 | xmlDocPtr doc);
73 |
74 | /****************************************************************
75 | * *
76 | * XML shell helpers *
77 | * *
78 | ****************************************************************/
79 |
80 | XMLPUBFUN void XMLCALL
81 | xmlLsOneNode (FILE *output, xmlNodePtr node);
82 | XMLPUBFUN int XMLCALL
83 | xmlLsCountNode (xmlNodePtr node);
84 |
85 | XMLPUBFUN const char * XMLCALL
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 XMLCALL
140 | xmlShellPrintXPathError (int errorType,
141 | const char *arg);
142 | XMLPUBFUN void XMLCALL
143 | xmlShellPrintXPathResult(xmlXPathObjectPtr list);
144 | XMLPUBFUN int XMLCALL
145 | xmlShellList (xmlShellCtxtPtr ctxt,
146 | char *arg,
147 | xmlNodePtr node,
148 | xmlNodePtr node2);
149 | XMLPUBFUN int XMLCALL
150 | xmlShellBase (xmlShellCtxtPtr ctxt,
151 | char *arg,
152 | xmlNodePtr node,
153 | xmlNodePtr node2);
154 | XMLPUBFUN int XMLCALL
155 | xmlShellDir (xmlShellCtxtPtr ctxt,
156 | char *arg,
157 | xmlNodePtr node,
158 | xmlNodePtr node2);
159 | XMLPUBFUN int XMLCALL
160 | xmlShellLoad (xmlShellCtxtPtr ctxt,
161 | char *filename,
162 | xmlNodePtr node,
163 | xmlNodePtr node2);
164 | #ifdef LIBXML_OUTPUT_ENABLED
165 | XMLPUBFUN void XMLCALL
166 | xmlShellPrintNode (xmlNodePtr node);
167 | XMLPUBFUN int XMLCALL
168 | xmlShellCat (xmlShellCtxtPtr ctxt,
169 | char *arg,
170 | xmlNodePtr node,
171 | xmlNodePtr node2);
172 | XMLPUBFUN int XMLCALL
173 | xmlShellWrite (xmlShellCtxtPtr ctxt,
174 | char *filename,
175 | xmlNodePtr node,
176 | xmlNodePtr node2);
177 | XMLPUBFUN int XMLCALL
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 XMLCALL
185 | xmlShellValidate (xmlShellCtxtPtr ctxt,
186 | char *dtd,
187 | xmlNodePtr node,
188 | xmlNodePtr node2);
189 | #endif /* LIBXML_VALID_ENABLED */
190 | XMLPUBFUN int XMLCALL
191 | xmlShellDu (xmlShellCtxtPtr ctxt,
192 | char *arg,
193 | xmlNodePtr tree,
194 | xmlNodePtr node2);
195 | XMLPUBFUN int XMLCALL
196 | xmlShellPwd (xmlShellCtxtPtr ctxt,
197 | char *buffer,
198 | xmlNodePtr node,
199 | xmlNodePtr node2);
200 |
201 | /*
202 | * The Shell interface.
203 | */
204 | XMLPUBFUN void XMLCALL
205 | xmlShell (xmlDocPtr doc,
206 | 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__ */
218 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/dict.h:
--------------------------------------------------------------------------------
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 | #ifdef __cplusplus
15 | #define __XML_EXTERNC extern "C"
16 | #else
17 | #define __XML_EXTERNC
18 | #endif
19 |
20 | /*
21 | * The dictionary.
22 | */
23 | __XML_EXTERNC typedef struct _xmlDict xmlDict;
24 | __XML_EXTERNC typedef xmlDict *xmlDictPtr;
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | /*
35 | * Initializer
36 | */
37 | XMLPUBFUN int XMLCALL xmlInitializeDict(void);
38 |
39 | /*
40 | * Constructor and destructor.
41 | */
42 | XMLPUBFUN xmlDictPtr XMLCALL
43 | xmlDictCreate (void);
44 | XMLPUBFUN size_t XMLCALL
45 | xmlDictSetLimit (xmlDictPtr dict,
46 | size_t limit);
47 | XMLPUBFUN size_t XMLCALL
48 | xmlDictGetUsage (xmlDictPtr dict);
49 | XMLPUBFUN xmlDictPtr XMLCALL
50 | xmlDictCreateSub(xmlDictPtr sub);
51 | XMLPUBFUN int XMLCALL
52 | xmlDictReference(xmlDictPtr dict);
53 | XMLPUBFUN void XMLCALL
54 | xmlDictFree (xmlDictPtr dict);
55 |
56 | /*
57 | * Lookup of entry in the dictionary.
58 | */
59 | XMLPUBFUN const xmlChar * XMLCALL
60 | xmlDictLookup (xmlDictPtr dict,
61 | const xmlChar *name,
62 | int len);
63 | XMLPUBFUN const xmlChar * XMLCALL
64 | xmlDictExists (xmlDictPtr dict,
65 | const xmlChar *name,
66 | int len);
67 | XMLPUBFUN const xmlChar * XMLCALL
68 | xmlDictQLookup (xmlDictPtr dict,
69 | const xmlChar *prefix,
70 | const xmlChar *name);
71 | XMLPUBFUN int XMLCALL
72 | xmlDictOwns (xmlDictPtr dict,
73 | const xmlChar *str);
74 | XMLPUBFUN int XMLCALL
75 | xmlDictSize (xmlDictPtr dict);
76 |
77 | /*
78 | * Cleanup function
79 | */
80 | XMLPUBFUN void XMLCALL
81 | xmlDictCleanup (void);
82 |
83 | #ifdef __cplusplus
84 | }
85 | #endif
86 | #endif /* ! __XML_DICT_H__ */
87 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/entities.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: interface for the XML entities handling
3 | * Description: this module provides some of the entity API needed
4 | * for the parser and applications.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __XML_ENTITIES_H__
12 | #define __XML_ENTITIES_H__
13 |
14 | #include
15 | #include
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 |
21 | /*
22 | * The different valid entity types.
23 | */
24 | typedef enum {
25 | XML_INTERNAL_GENERAL_ENTITY = 1,
26 | XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
27 | XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
28 | XML_INTERNAL_PARAMETER_ENTITY = 4,
29 | XML_EXTERNAL_PARAMETER_ENTITY = 5,
30 | XML_INTERNAL_PREDEFINED_ENTITY = 6
31 | } xmlEntityType;
32 |
33 | /*
34 | * An unit of storage for an entity, contains the string, the value
35 | * and the linkind data needed for the linking in the hash table.
36 | */
37 |
38 | struct _xmlEntity {
39 | void *_private; /* application data */
40 | xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
41 | const xmlChar *name; /* Entity name */
42 | struct _xmlNode *children; /* First child link */
43 | struct _xmlNode *last; /* Last child link */
44 | struct _xmlDtd *parent; /* -> DTD */
45 | struct _xmlNode *next; /* next sibling link */
46 | struct _xmlNode *prev; /* previous sibling link */
47 | struct _xmlDoc *doc; /* the containing document */
48 |
49 | xmlChar *orig; /* content without ref substitution */
50 | xmlChar *content; /* content or ndata if unparsed */
51 | int length; /* the content length */
52 | xmlEntityType etype; /* The entity type */
53 | const xmlChar *ExternalID; /* External identifier for PUBLIC */
54 | const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
55 |
56 | struct _xmlEntity *nexte; /* unused */
57 | const xmlChar *URI; /* the full URI as computed */
58 | int owner; /* does the entity own the childrens */
59 | int checked; /* was the entity content checked */
60 | /* this is also used to count entities
61 | * references done from that entity
62 | * and if it contains '<' */
63 | };
64 |
65 | /*
66 | * All entities are stored in an hash table.
67 | * There is 2 separate hash tables for global and parameter entities.
68 | */
69 |
70 | typedef struct _xmlHashTable xmlEntitiesTable;
71 | typedef xmlEntitiesTable *xmlEntitiesTablePtr;
72 |
73 | /*
74 | * External functions:
75 | */
76 |
77 | #ifdef LIBXML_LEGACY_ENABLED
78 | XMLPUBFUN void XMLCALL
79 | xmlInitializePredefinedEntities (void);
80 | #endif /* LIBXML_LEGACY_ENABLED */
81 |
82 | XMLPUBFUN xmlEntityPtr XMLCALL
83 | xmlNewEntity (xmlDocPtr doc,
84 | const xmlChar *name,
85 | int type,
86 | const xmlChar *ExternalID,
87 | const xmlChar *SystemID,
88 | const xmlChar *content);
89 | XMLPUBFUN xmlEntityPtr XMLCALL
90 | xmlAddDocEntity (xmlDocPtr doc,
91 | const xmlChar *name,
92 | int type,
93 | const xmlChar *ExternalID,
94 | const xmlChar *SystemID,
95 | const xmlChar *content);
96 | XMLPUBFUN xmlEntityPtr XMLCALL
97 | xmlAddDtdEntity (xmlDocPtr doc,
98 | const xmlChar *name,
99 | int type,
100 | const xmlChar *ExternalID,
101 | const xmlChar *SystemID,
102 | const xmlChar *content);
103 | XMLPUBFUN xmlEntityPtr XMLCALL
104 | xmlGetPredefinedEntity (const xmlChar *name);
105 | XMLPUBFUN xmlEntityPtr XMLCALL
106 | xmlGetDocEntity (const xmlDoc *doc,
107 | const xmlChar *name);
108 | XMLPUBFUN xmlEntityPtr XMLCALL
109 | xmlGetDtdEntity (xmlDocPtr doc,
110 | const xmlChar *name);
111 | XMLPUBFUN xmlEntityPtr XMLCALL
112 | xmlGetParameterEntity (xmlDocPtr doc,
113 | const xmlChar *name);
114 | #ifdef LIBXML_LEGACY_ENABLED
115 | XMLPUBFUN const xmlChar * XMLCALL
116 | xmlEncodeEntities (xmlDocPtr doc,
117 | const xmlChar *input);
118 | #endif /* LIBXML_LEGACY_ENABLED */
119 | XMLPUBFUN xmlChar * XMLCALL
120 | xmlEncodeEntitiesReentrant(xmlDocPtr doc,
121 | const xmlChar *input);
122 | XMLPUBFUN xmlChar * XMLCALL
123 | xmlEncodeSpecialChars (const xmlDoc *doc,
124 | const xmlChar *input);
125 | XMLPUBFUN xmlEntitiesTablePtr XMLCALL
126 | xmlCreateEntitiesTable (void);
127 | #ifdef LIBXML_TREE_ENABLED
128 | XMLPUBFUN xmlEntitiesTablePtr XMLCALL
129 | xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
130 | #endif /* LIBXML_TREE_ENABLED */
131 | XMLPUBFUN void XMLCALL
132 | xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
133 | #ifdef LIBXML_OUTPUT_ENABLED
134 | XMLPUBFUN void XMLCALL
135 | xmlDumpEntitiesTable (xmlBufferPtr buf,
136 | xmlEntitiesTablePtr table);
137 | XMLPUBFUN void XMLCALL
138 | xmlDumpEntityDecl (xmlBufferPtr buf,
139 | xmlEntityPtr ent);
140 | #endif /* LIBXML_OUTPUT_ENABLED */
141 | #ifdef LIBXML_LEGACY_ENABLED
142 | XMLPUBFUN void XMLCALL
143 | xmlCleanupPredefinedEntities(void);
144 | #endif /* LIBXML_LEGACY_ENABLED */
145 |
146 |
147 | #ifdef __cplusplus
148 | }
149 | #endif
150 |
151 | # endif /* __XML_ENTITIES_H__ */
152 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/hash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Chained hash tables
3 | * Description: This module implements the hash table support used in
4 | * various places in the library.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Bjorn Reese
9 | */
10 |
11 | #ifndef __XML_HASH_H__
12 | #define __XML_HASH_H__
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | /*
19 | * The hash table.
20 | */
21 | typedef struct _xmlHashTable xmlHashTable;
22 | typedef xmlHashTable *xmlHashTablePtr;
23 |
24 | #ifdef __cplusplus
25 | }
26 | #endif
27 |
28 | #include
29 | #include
30 | #include
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | /*
37 | * Recent version of gcc produce a warning when a function pointer is assigned
38 | * to an object pointer, or vice versa. The following macro is a dirty hack
39 | * to allow suppression of the warning. If your architecture has function
40 | * pointers which are a different size than a void pointer, there may be some
41 | * serious trouble within the library.
42 | */
43 | /**
44 | * XML_CAST_FPTR:
45 | * @fptr: pointer to a function
46 | *
47 | * Macro to do a casting from an object pointer to a
48 | * function pointer without encountering a warning from
49 | * gcc
50 | *
51 | * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
52 | * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
53 | * so it is disabled now
54 | */
55 |
56 | #define XML_CAST_FPTR(fptr) fptr
57 |
58 |
59 | /*
60 | * function types:
61 | */
62 | /**
63 | * xmlHashDeallocator:
64 | * @payload: the data in the hash
65 | * @name: the name associated
66 | *
67 | * Callback to free data from a hash.
68 | */
69 | typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
70 | /**
71 | * xmlHashCopier:
72 | * @payload: the data in the hash
73 | * @name: the name associated
74 | *
75 | * Callback to copy data from a hash.
76 | *
77 | * Returns a copy of the data or NULL in case of error.
78 | */
79 | typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
80 | /**
81 | * xmlHashScanner:
82 | * @payload: the data in the hash
83 | * @data: extra scannner data
84 | * @name: the name associated
85 | *
86 | * Callback when scanning data in a hash with the simple scanner.
87 | */
88 | typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
89 | /**
90 | * xmlHashScannerFull:
91 | * @payload: the data in the hash
92 | * @data: extra scannner data
93 | * @name: the name associated
94 | * @name2: the second name associated
95 | * @name3: the third name associated
96 | *
97 | * Callback when scanning data in a hash with the full scanner.
98 | */
99 | typedef void (*xmlHashScannerFull)(void *payload, void *data,
100 | const xmlChar *name, const xmlChar *name2,
101 | const xmlChar *name3);
102 |
103 | /*
104 | * Constructor and destructor.
105 | */
106 | XMLPUBFUN xmlHashTablePtr XMLCALL
107 | xmlHashCreate (int size);
108 | XMLPUBFUN xmlHashTablePtr XMLCALL
109 | xmlHashCreateDict(int size,
110 | xmlDictPtr dict);
111 | XMLPUBFUN void XMLCALL
112 | xmlHashFree (xmlHashTablePtr table,
113 | xmlHashDeallocator f);
114 |
115 | /*
116 | * Add a new entry to the hash table.
117 | */
118 | XMLPUBFUN int XMLCALL
119 | xmlHashAddEntry (xmlHashTablePtr table,
120 | const xmlChar *name,
121 | void *userdata);
122 | XMLPUBFUN int XMLCALL
123 | xmlHashUpdateEntry(xmlHashTablePtr table,
124 | const xmlChar *name,
125 | void *userdata,
126 | xmlHashDeallocator f);
127 | XMLPUBFUN int XMLCALL
128 | xmlHashAddEntry2(xmlHashTablePtr table,
129 | const xmlChar *name,
130 | const xmlChar *name2,
131 | void *userdata);
132 | XMLPUBFUN int XMLCALL
133 | xmlHashUpdateEntry2(xmlHashTablePtr table,
134 | const xmlChar *name,
135 | const xmlChar *name2,
136 | void *userdata,
137 | xmlHashDeallocator f);
138 | XMLPUBFUN int XMLCALL
139 | xmlHashAddEntry3(xmlHashTablePtr table,
140 | const xmlChar *name,
141 | const xmlChar *name2,
142 | const xmlChar *name3,
143 | void *userdata);
144 | XMLPUBFUN int XMLCALL
145 | xmlHashUpdateEntry3(xmlHashTablePtr table,
146 | const xmlChar *name,
147 | const xmlChar *name2,
148 | const xmlChar *name3,
149 | void *userdata,
150 | xmlHashDeallocator f);
151 |
152 | /*
153 | * Remove an entry from the hash table.
154 | */
155 | XMLPUBFUN int XMLCALL
156 | xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
157 | xmlHashDeallocator f);
158 | XMLPUBFUN int XMLCALL
159 | xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
160 | const xmlChar *name2, xmlHashDeallocator f);
161 | XMLPUBFUN int XMLCALL
162 | xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
163 | const xmlChar *name2, const xmlChar *name3,
164 | xmlHashDeallocator f);
165 |
166 | /*
167 | * Retrieve the userdata.
168 | */
169 | XMLPUBFUN void * XMLCALL
170 | xmlHashLookup (xmlHashTablePtr table,
171 | const xmlChar *name);
172 | XMLPUBFUN void * XMLCALL
173 | xmlHashLookup2 (xmlHashTablePtr table,
174 | const xmlChar *name,
175 | const xmlChar *name2);
176 | XMLPUBFUN void * XMLCALL
177 | xmlHashLookup3 (xmlHashTablePtr table,
178 | const xmlChar *name,
179 | const xmlChar *name2,
180 | const xmlChar *name3);
181 | XMLPUBFUN void * XMLCALL
182 | xmlHashQLookup (xmlHashTablePtr table,
183 | const xmlChar *name,
184 | const xmlChar *prefix);
185 | XMLPUBFUN void * XMLCALL
186 | xmlHashQLookup2 (xmlHashTablePtr table,
187 | const xmlChar *name,
188 | const xmlChar *prefix,
189 | const xmlChar *name2,
190 | const xmlChar *prefix2);
191 | XMLPUBFUN void * XMLCALL
192 | xmlHashQLookup3 (xmlHashTablePtr table,
193 | const xmlChar *name,
194 | const xmlChar *prefix,
195 | const xmlChar *name2,
196 | const xmlChar *prefix2,
197 | const xmlChar *name3,
198 | const xmlChar *prefix3);
199 |
200 | /*
201 | * Helpers.
202 | */
203 | XMLPUBFUN xmlHashTablePtr XMLCALL
204 | xmlHashCopy (xmlHashTablePtr table,
205 | xmlHashCopier f);
206 | XMLPUBFUN int XMLCALL
207 | xmlHashSize (xmlHashTablePtr table);
208 | XMLPUBFUN void XMLCALL
209 | xmlHashScan (xmlHashTablePtr table,
210 | xmlHashScanner f,
211 | void *data);
212 | XMLPUBFUN void XMLCALL
213 | xmlHashScan3 (xmlHashTablePtr table,
214 | const xmlChar *name,
215 | const xmlChar *name2,
216 | const xmlChar *name3,
217 | xmlHashScanner f,
218 | void *data);
219 | XMLPUBFUN void XMLCALL
220 | xmlHashScanFull (xmlHashTablePtr table,
221 | xmlHashScannerFull f,
222 | void *data);
223 | XMLPUBFUN void XMLCALL
224 | xmlHashScanFull3(xmlHashTablePtr table,
225 | const xmlChar *name,
226 | const xmlChar *name2,
227 | const xmlChar *name3,
228 | xmlHashScannerFull f,
229 | void *data);
230 | #ifdef __cplusplus
231 | }
232 | #endif
233 | #endif /* ! __XML_HASH_H__ */
234 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/list.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: lists interfaces
3 | * Description: this module implement the list support used in
4 | * various place in the library.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Gary Pennington
9 | */
10 |
11 | #ifndef __XML_LINK_INCLUDE__
12 | #define __XML_LINK_INCLUDE__
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | typedef struct _xmlLink xmlLink;
21 | typedef xmlLink *xmlLinkPtr;
22 |
23 | typedef struct _xmlList xmlList;
24 | typedef xmlList *xmlListPtr;
25 |
26 | /**
27 | * xmlListDeallocator:
28 | * @lk: the data to deallocate
29 | *
30 | * Callback function used to free data from a list.
31 | */
32 | typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
33 | /**
34 | * xmlListDataCompare:
35 | * @data0: the first data
36 | * @data1: the second data
37 | *
38 | * Callback function used to compare 2 data.
39 | *
40 | * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
41 | */
42 | typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
43 | /**
44 | * xmlListWalker:
45 | * @data: the data found in the list
46 | * @user: extra user provided data to the walker
47 | *
48 | * Callback function used when walking a list with xmlListWalk().
49 | *
50 | * Returns 0 to stop walking the list, 1 otherwise.
51 | */
52 | typedef int (*xmlListWalker) (const void *data, const void *user);
53 |
54 | /* Creation/Deletion */
55 | XMLPUBFUN xmlListPtr XMLCALL
56 | xmlListCreate (xmlListDeallocator deallocator,
57 | xmlListDataCompare compare);
58 | XMLPUBFUN void XMLCALL
59 | xmlListDelete (xmlListPtr l);
60 |
61 | /* Basic Operators */
62 | XMLPUBFUN void * XMLCALL
63 | xmlListSearch (xmlListPtr l,
64 | void *data);
65 | XMLPUBFUN void * XMLCALL
66 | xmlListReverseSearch (xmlListPtr l,
67 | void *data);
68 | XMLPUBFUN int XMLCALL
69 | xmlListInsert (xmlListPtr l,
70 | void *data) ;
71 | XMLPUBFUN int XMLCALL
72 | xmlListAppend (xmlListPtr l,
73 | void *data) ;
74 | XMLPUBFUN int XMLCALL
75 | xmlListRemoveFirst (xmlListPtr l,
76 | void *data);
77 | XMLPUBFUN int XMLCALL
78 | xmlListRemoveLast (xmlListPtr l,
79 | void *data);
80 | XMLPUBFUN int XMLCALL
81 | xmlListRemoveAll (xmlListPtr l,
82 | void *data);
83 | XMLPUBFUN void XMLCALL
84 | xmlListClear (xmlListPtr l);
85 | XMLPUBFUN int XMLCALL
86 | xmlListEmpty (xmlListPtr l);
87 | XMLPUBFUN xmlLinkPtr XMLCALL
88 | xmlListFront (xmlListPtr l);
89 | XMLPUBFUN xmlLinkPtr XMLCALL
90 | xmlListEnd (xmlListPtr l);
91 | XMLPUBFUN int XMLCALL
92 | xmlListSize (xmlListPtr l);
93 |
94 | XMLPUBFUN void XMLCALL
95 | xmlListPopFront (xmlListPtr l);
96 | XMLPUBFUN void XMLCALL
97 | xmlListPopBack (xmlListPtr l);
98 | XMLPUBFUN int XMLCALL
99 | xmlListPushFront (xmlListPtr l,
100 | void *data);
101 | XMLPUBFUN int XMLCALL
102 | xmlListPushBack (xmlListPtr l,
103 | void *data);
104 |
105 | /* Advanced Operators */
106 | XMLPUBFUN void XMLCALL
107 | xmlListReverse (xmlListPtr l);
108 | XMLPUBFUN void XMLCALL
109 | xmlListSort (xmlListPtr l);
110 | XMLPUBFUN void XMLCALL
111 | xmlListWalk (xmlListPtr l,
112 | xmlListWalker walker,
113 | const void *user);
114 | XMLPUBFUN void XMLCALL
115 | xmlListReverseWalk (xmlListPtr l,
116 | xmlListWalker walker,
117 | const void *user);
118 | XMLPUBFUN void XMLCALL
119 | xmlListMerge (xmlListPtr l1,
120 | xmlListPtr l2);
121 | XMLPUBFUN xmlListPtr XMLCALL
122 | xmlListDup (const xmlListPtr old);
123 | XMLPUBFUN int XMLCALL
124 | xmlListCopy (xmlListPtr cur,
125 | const xmlListPtr old);
126 | /* Link operators */
127 | XMLPUBFUN void * XMLCALL
128 | xmlLinkGetData (xmlLinkPtr lk);
129 |
130 | /* xmlListUnique() */
131 | /* xmlListSwap */
132 |
133 | #ifdef __cplusplus
134 | }
135 | #endif
136 |
137 | #endif /* __XML_LINK_INCLUDE__ */
138 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/nanoftp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: minimal FTP implementation
3 | * Description: minimal FTP implementation allowing to fetch resources
4 | * like external subset.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __NANO_FTP_H__
12 | #define __NANO_FTP_H__
13 |
14 | #include
15 |
16 | #ifdef LIBXML_FTP_ENABLED
17 |
18 | /* Needed for portability to Windows 64 bits */
19 | #if defined(__MINGW32__) || defined(_WIN32_WCE)
20 | #include
21 | #else
22 | /**
23 | * SOCKET:
24 | *
25 | * macro used to provide portability of code to windows sockets
26 | */
27 | #define SOCKET int
28 | /**
29 | * INVALID_SOCKET:
30 | *
31 | * macro used to provide portability of code to windows sockets
32 | * the value to be used when the socket is not valid
33 | */
34 | #undef INVALID_SOCKET
35 | #define INVALID_SOCKET (-1)
36 | #endif
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /**
43 | * ftpListCallback:
44 | * @userData: user provided data for the callback
45 | * @filename: the file name (including "->" when links are shown)
46 | * @attrib: the attribute string
47 | * @owner: the owner string
48 | * @group: the group string
49 | * @size: the file size
50 | * @links: the link count
51 | * @year: the year
52 | * @month: the month
53 | * @day: the day
54 | * @hour: the hour
55 | * @minute: the minute
56 | *
57 | * A callback for the xmlNanoFTPList command.
58 | * Note that only one of year and day:minute are specified.
59 | */
60 | typedef void (*ftpListCallback) (void *userData,
61 | const char *filename, const char *attrib,
62 | const char *owner, const char *group,
63 | unsigned long size, int links, int year,
64 | const char *month, int day, int hour,
65 | int minute);
66 | /**
67 | * ftpDataCallback:
68 | * @userData: the user provided context
69 | * @data: the data received
70 | * @len: its size in bytes
71 | *
72 | * A callback for the xmlNanoFTPGet command.
73 | */
74 | typedef void (*ftpDataCallback) (void *userData,
75 | const char *data,
76 | int len);
77 |
78 | /*
79 | * Init
80 | */
81 | XMLPUBFUN void XMLCALL
82 | xmlNanoFTPInit (void);
83 | XMLPUBFUN void XMLCALL
84 | xmlNanoFTPCleanup (void);
85 |
86 | /*
87 | * Creating/freeing contexts.
88 | */
89 | XMLPUBFUN void * XMLCALL
90 | xmlNanoFTPNewCtxt (const char *URL);
91 | XMLPUBFUN void XMLCALL
92 | xmlNanoFTPFreeCtxt (void * ctx);
93 | XMLPUBFUN void * XMLCALL
94 | xmlNanoFTPConnectTo (const char *server,
95 | int port);
96 | /*
97 | * Opening/closing session connections.
98 | */
99 | XMLPUBFUN void * XMLCALL
100 | xmlNanoFTPOpen (const char *URL);
101 | XMLPUBFUN int XMLCALL
102 | xmlNanoFTPConnect (void *ctx);
103 | XMLPUBFUN int XMLCALL
104 | xmlNanoFTPClose (void *ctx);
105 | XMLPUBFUN int XMLCALL
106 | xmlNanoFTPQuit (void *ctx);
107 | XMLPUBFUN void XMLCALL
108 | xmlNanoFTPScanProxy (const char *URL);
109 | XMLPUBFUN void XMLCALL
110 | xmlNanoFTPProxy (const char *host,
111 | int port,
112 | const char *user,
113 | const char *passwd,
114 | int type);
115 | XMLPUBFUN int XMLCALL
116 | xmlNanoFTPUpdateURL (void *ctx,
117 | const char *URL);
118 |
119 | /*
120 | * Rather internal commands.
121 | */
122 | XMLPUBFUN int XMLCALL
123 | xmlNanoFTPGetResponse (void *ctx);
124 | XMLPUBFUN int XMLCALL
125 | xmlNanoFTPCheckResponse (void *ctx);
126 |
127 | /*
128 | * CD/DIR/GET handlers.
129 | */
130 | XMLPUBFUN int XMLCALL
131 | xmlNanoFTPCwd (void *ctx,
132 | const char *directory);
133 | XMLPUBFUN int XMLCALL
134 | xmlNanoFTPDele (void *ctx,
135 | const char *file);
136 |
137 | XMLPUBFUN SOCKET XMLCALL
138 | xmlNanoFTPGetConnection (void *ctx);
139 | XMLPUBFUN int XMLCALL
140 | xmlNanoFTPCloseConnection(void *ctx);
141 | XMLPUBFUN int XMLCALL
142 | xmlNanoFTPList (void *ctx,
143 | ftpListCallback callback,
144 | void *userData,
145 | const char *filename);
146 | XMLPUBFUN SOCKET XMLCALL
147 | xmlNanoFTPGetSocket (void *ctx,
148 | const char *filename);
149 | XMLPUBFUN int XMLCALL
150 | xmlNanoFTPGet (void *ctx,
151 | ftpDataCallback callback,
152 | void *userData,
153 | const char *filename);
154 | XMLPUBFUN int XMLCALL
155 | xmlNanoFTPRead (void *ctx,
156 | void *dest,
157 | int len);
158 |
159 | #ifdef __cplusplus
160 | }
161 | #endif
162 | #endif /* LIBXML_FTP_ENABLED */
163 | #endif /* __NANO_FTP_H__ */
164 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/nanohttp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: minimal HTTP implementation
3 | * Description: minimal HTTP implementation allowing to fetch resources
4 | * like external subset.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __NANO_HTTP_H__
12 | #define __NANO_HTTP_H__
13 |
14 | #include
15 |
16 | #ifdef LIBXML_HTTP_ENABLED
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 | XMLPUBFUN void XMLCALL
22 | xmlNanoHTTPInit (void);
23 | XMLPUBFUN void XMLCALL
24 | xmlNanoHTTPCleanup (void);
25 | XMLPUBFUN void XMLCALL
26 | xmlNanoHTTPScanProxy (const char *URL);
27 | XMLPUBFUN int XMLCALL
28 | xmlNanoHTTPFetch (const char *URL,
29 | const char *filename,
30 | char **contentType);
31 | XMLPUBFUN void * XMLCALL
32 | xmlNanoHTTPMethod (const char *URL,
33 | const char *method,
34 | const char *input,
35 | char **contentType,
36 | const char *headers,
37 | int ilen);
38 | XMLPUBFUN void * XMLCALL
39 | xmlNanoHTTPMethodRedir (const char *URL,
40 | const char *method,
41 | const char *input,
42 | char **contentType,
43 | char **redir,
44 | const char *headers,
45 | int ilen);
46 | XMLPUBFUN void * XMLCALL
47 | xmlNanoHTTPOpen (const char *URL,
48 | char **contentType);
49 | XMLPUBFUN void * XMLCALL
50 | xmlNanoHTTPOpenRedir (const char *URL,
51 | char **contentType,
52 | char **redir);
53 | XMLPUBFUN int XMLCALL
54 | xmlNanoHTTPReturnCode (void *ctx);
55 | XMLPUBFUN const char * XMLCALL
56 | xmlNanoHTTPAuthHeader (void *ctx);
57 | XMLPUBFUN const char * XMLCALL
58 | xmlNanoHTTPRedir (void *ctx);
59 | XMLPUBFUN int XMLCALL
60 | xmlNanoHTTPContentLength( void * ctx );
61 | XMLPUBFUN const char * XMLCALL
62 | xmlNanoHTTPEncoding (void *ctx);
63 | XMLPUBFUN const char * XMLCALL
64 | xmlNanoHTTPMimeType (void *ctx);
65 | XMLPUBFUN int XMLCALL
66 | xmlNanoHTTPRead (void *ctx,
67 | void *dest,
68 | int len);
69 | #ifdef LIBXML_OUTPUT_ENABLED
70 | XMLPUBFUN int XMLCALL
71 | xmlNanoHTTPSave (void *ctxt,
72 | const char *filename);
73 | #endif /* LIBXML_OUTPUT_ENABLED */
74 | XMLPUBFUN void XMLCALL
75 | xmlNanoHTTPClose (void *ctx);
76 | #ifdef __cplusplus
77 | }
78 | #endif
79 |
80 | #endif /* LIBXML_HTTP_ENABLED */
81 | #endif /* __NANO_HTTP_H__ */
82 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/pattern.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: pattern expression handling
3 | * Description: allows to compile and test pattern expressions for nodes
4 | * either in a tree or based on a parser state.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __XML_PATTERN_H__
12 | #define __XML_PATTERN_H__
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | #ifdef LIBXML_PATTERN_ENABLED
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | /**
25 | * xmlPattern:
26 | *
27 | * A compiled (XPath based) pattern to select nodes
28 | */
29 | typedef struct _xmlPattern xmlPattern;
30 | typedef xmlPattern *xmlPatternPtr;
31 |
32 | /**
33 | * xmlPatternFlags:
34 | *
35 | * This is the set of options affecting the behaviour of pattern
36 | * matching with this module
37 | *
38 | */
39 | typedef enum {
40 | XML_PATTERN_DEFAULT = 0, /* simple pattern match */
41 | XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
42 | XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
43 | XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
44 | } xmlPatternFlags;
45 |
46 | XMLPUBFUN void XMLCALL
47 | xmlFreePattern (xmlPatternPtr comp);
48 |
49 | XMLPUBFUN void XMLCALL
50 | xmlFreePatternList (xmlPatternPtr comp);
51 |
52 | XMLPUBFUN xmlPatternPtr XMLCALL
53 | xmlPatterncompile (const xmlChar *pattern,
54 | xmlDict *dict,
55 | int flags,
56 | const xmlChar **namespaces);
57 | XMLPUBFUN int XMLCALL
58 | xmlPatternMatch (xmlPatternPtr comp,
59 | xmlNodePtr node);
60 |
61 | /* streaming interfaces */
62 | typedef struct _xmlStreamCtxt xmlStreamCtxt;
63 | typedef xmlStreamCtxt *xmlStreamCtxtPtr;
64 |
65 | XMLPUBFUN int XMLCALL
66 | xmlPatternStreamable (xmlPatternPtr comp);
67 | XMLPUBFUN int XMLCALL
68 | xmlPatternMaxDepth (xmlPatternPtr comp);
69 | XMLPUBFUN int XMLCALL
70 | xmlPatternMinDepth (xmlPatternPtr comp);
71 | XMLPUBFUN int XMLCALL
72 | xmlPatternFromRoot (xmlPatternPtr comp);
73 | XMLPUBFUN xmlStreamCtxtPtr XMLCALL
74 | xmlPatternGetStreamCtxt (xmlPatternPtr comp);
75 | XMLPUBFUN void XMLCALL
76 | xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
77 | XMLPUBFUN int XMLCALL
78 | xmlStreamPushNode (xmlStreamCtxtPtr stream,
79 | const xmlChar *name,
80 | const xmlChar *ns,
81 | int nodeType);
82 | XMLPUBFUN int XMLCALL
83 | xmlStreamPush (xmlStreamCtxtPtr stream,
84 | const xmlChar *name,
85 | const xmlChar *ns);
86 | XMLPUBFUN int XMLCALL
87 | xmlStreamPushAttr (xmlStreamCtxtPtr stream,
88 | const xmlChar *name,
89 | const xmlChar *ns);
90 | XMLPUBFUN int XMLCALL
91 | xmlStreamPop (xmlStreamCtxtPtr stream);
92 | XMLPUBFUN int XMLCALL
93 | xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
94 | #ifdef __cplusplus
95 | }
96 | #endif
97 |
98 | #endif /* LIBXML_PATTERN_ENABLED */
99 |
100 | #endif /* __XML_PATTERN_H__ */
101 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/relaxng.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: implementation of the Relax-NG validation
3 | * Description: implementation of the Relax-NG validation
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Daniel Veillard
8 | */
9 |
10 | #ifndef __XML_RELAX_NG__
11 | #define __XML_RELAX_NG__
12 |
13 | #include
14 | #include
15 | #include
16 |
17 | #ifdef LIBXML_SCHEMAS_ENABLED
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | typedef struct _xmlRelaxNG xmlRelaxNG;
24 | typedef xmlRelaxNG *xmlRelaxNGPtr;
25 |
26 |
27 | /**
28 | * xmlRelaxNGValidityErrorFunc:
29 | * @ctx: the validation context
30 | * @msg: the message
31 | * @...: extra arguments
32 | *
33 | * Signature of an error callback from a Relax-NG validation
34 | */
35 | typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
36 | const char *msg,
37 | ...) LIBXML_ATTR_FORMAT(2,3);
38 |
39 | /**
40 | * xmlRelaxNGValidityWarningFunc:
41 | * @ctx: the validation context
42 | * @msg: the message
43 | * @...: extra arguments
44 | *
45 | * Signature of a warning callback from a Relax-NG validation
46 | */
47 | typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
48 | const char *msg,
49 | ...) LIBXML_ATTR_FORMAT(2,3);
50 |
51 | /**
52 | * A schemas validation context
53 | */
54 | typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
55 | typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
56 |
57 | typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
58 | typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
59 |
60 | /*
61 | * xmlRelaxNGValidErr:
62 | *
63 | * List of possible Relax NG validation errors
64 | */
65 | typedef enum {
66 | XML_RELAXNG_OK = 0,
67 | XML_RELAXNG_ERR_MEMORY,
68 | XML_RELAXNG_ERR_TYPE,
69 | XML_RELAXNG_ERR_TYPEVAL,
70 | XML_RELAXNG_ERR_DUPID,
71 | XML_RELAXNG_ERR_TYPECMP,
72 | XML_RELAXNG_ERR_NOSTATE,
73 | XML_RELAXNG_ERR_NODEFINE,
74 | XML_RELAXNG_ERR_LISTEXTRA,
75 | XML_RELAXNG_ERR_LISTEMPTY,
76 | XML_RELAXNG_ERR_INTERNODATA,
77 | XML_RELAXNG_ERR_INTERSEQ,
78 | XML_RELAXNG_ERR_INTEREXTRA,
79 | XML_RELAXNG_ERR_ELEMNAME,
80 | XML_RELAXNG_ERR_ATTRNAME,
81 | XML_RELAXNG_ERR_ELEMNONS,
82 | XML_RELAXNG_ERR_ATTRNONS,
83 | XML_RELAXNG_ERR_ELEMWRONGNS,
84 | XML_RELAXNG_ERR_ATTRWRONGNS,
85 | XML_RELAXNG_ERR_ELEMEXTRANS,
86 | XML_RELAXNG_ERR_ATTREXTRANS,
87 | XML_RELAXNG_ERR_ELEMNOTEMPTY,
88 | XML_RELAXNG_ERR_NOELEM,
89 | XML_RELAXNG_ERR_NOTELEM,
90 | XML_RELAXNG_ERR_ATTRVALID,
91 | XML_RELAXNG_ERR_CONTENTVALID,
92 | XML_RELAXNG_ERR_EXTRACONTENT,
93 | XML_RELAXNG_ERR_INVALIDATTR,
94 | XML_RELAXNG_ERR_DATAELEM,
95 | XML_RELAXNG_ERR_VALELEM,
96 | XML_RELAXNG_ERR_LISTELEM,
97 | XML_RELAXNG_ERR_DATATYPE,
98 | XML_RELAXNG_ERR_VALUE,
99 | XML_RELAXNG_ERR_LIST,
100 | XML_RELAXNG_ERR_NOGRAMMAR,
101 | XML_RELAXNG_ERR_EXTRADATA,
102 | XML_RELAXNG_ERR_LACKDATA,
103 | XML_RELAXNG_ERR_INTERNAL,
104 | XML_RELAXNG_ERR_ELEMWRONG,
105 | XML_RELAXNG_ERR_TEXTWRONG
106 | } xmlRelaxNGValidErr;
107 |
108 | /*
109 | * xmlRelaxNGParserFlags:
110 | *
111 | * List of possible Relax NG Parser flags
112 | */
113 | typedef enum {
114 | XML_RELAXNGP_NONE = 0,
115 | XML_RELAXNGP_FREE_DOC = 1,
116 | XML_RELAXNGP_CRNG = 2
117 | } xmlRelaxNGParserFlag;
118 |
119 | XMLPUBFUN int XMLCALL
120 | xmlRelaxNGInitTypes (void);
121 | XMLPUBFUN void XMLCALL
122 | xmlRelaxNGCleanupTypes (void);
123 |
124 | /*
125 | * Interfaces for parsing.
126 | */
127 | XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
128 | xmlRelaxNGNewParserCtxt (const char *URL);
129 | XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
130 | xmlRelaxNGNewMemParserCtxt (const char *buffer,
131 | int size);
132 | XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
133 | xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
134 |
135 | XMLPUBFUN int XMLCALL
136 | xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
137 | int flag);
138 |
139 | XMLPUBFUN void XMLCALL
140 | xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
141 | XMLPUBFUN void XMLCALL
142 | xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
143 | xmlRelaxNGValidityErrorFunc err,
144 | xmlRelaxNGValidityWarningFunc warn,
145 | void *ctx);
146 | XMLPUBFUN int XMLCALL
147 | xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
148 | xmlRelaxNGValidityErrorFunc *err,
149 | xmlRelaxNGValidityWarningFunc *warn,
150 | void **ctx);
151 | XMLPUBFUN void XMLCALL
152 | xmlRelaxNGSetParserStructuredErrors(
153 | xmlRelaxNGParserCtxtPtr ctxt,
154 | xmlStructuredErrorFunc serror,
155 | void *ctx);
156 | XMLPUBFUN xmlRelaxNGPtr XMLCALL
157 | xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
158 | XMLPUBFUN void XMLCALL
159 | xmlRelaxNGFree (xmlRelaxNGPtr schema);
160 | #ifdef LIBXML_OUTPUT_ENABLED
161 | XMLPUBFUN void XMLCALL
162 | xmlRelaxNGDump (FILE *output,
163 | xmlRelaxNGPtr schema);
164 | XMLPUBFUN void XMLCALL
165 | xmlRelaxNGDumpTree (FILE * output,
166 | xmlRelaxNGPtr schema);
167 | #endif /* LIBXML_OUTPUT_ENABLED */
168 | /*
169 | * Interfaces for validating
170 | */
171 | XMLPUBFUN void XMLCALL
172 | xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
173 | xmlRelaxNGValidityErrorFunc err,
174 | xmlRelaxNGValidityWarningFunc warn,
175 | void *ctx);
176 | XMLPUBFUN int XMLCALL
177 | xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
178 | xmlRelaxNGValidityErrorFunc *err,
179 | xmlRelaxNGValidityWarningFunc *warn,
180 | void **ctx);
181 | XMLPUBFUN void XMLCALL
182 | xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
183 | xmlStructuredErrorFunc serror, void *ctx);
184 | XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
185 | xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
186 | XMLPUBFUN void XMLCALL
187 | xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
188 | XMLPUBFUN int XMLCALL
189 | xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
190 | xmlDocPtr doc);
191 | /*
192 | * Interfaces for progressive validation when possible
193 | */
194 | XMLPUBFUN int XMLCALL
195 | xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
196 | xmlDocPtr doc,
197 | xmlNodePtr elem);
198 | XMLPUBFUN int XMLCALL
199 | xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
200 | const xmlChar *data,
201 | int len);
202 | XMLPUBFUN int XMLCALL
203 | xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
204 | xmlDocPtr doc,
205 | xmlNodePtr elem);
206 | XMLPUBFUN int XMLCALL
207 | xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
208 | xmlDocPtr doc,
209 | xmlNodePtr elem);
210 |
211 | #ifdef __cplusplus
212 | }
213 | #endif
214 |
215 | #endif /* LIBXML_SCHEMAS_ENABLED */
216 |
217 | #endif /* __XML_RELAX_NG__ */
218 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/schematron.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: XML Schemastron implementation
3 | * Description: interface to the XML Schematron validity checking.
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Daniel Veillard
8 | */
9 |
10 |
11 | #ifndef __XML_SCHEMATRON_H__
12 | #define __XML_SCHEMATRON_H__
13 |
14 | #include
15 |
16 | #ifdef LIBXML_SCHEMATRON_ENABLED
17 |
18 | #include
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | typedef enum {
25 | XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
26 | XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
27 | XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
28 | XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
29 | XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
30 | XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
31 | XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
32 | } xmlSchematronValidOptions;
33 |
34 | /**
35 | * The schemas related types are kept internal
36 | */
37 | typedef struct _xmlSchematron xmlSchematron;
38 | typedef xmlSchematron *xmlSchematronPtr;
39 |
40 | /**
41 | * xmlSchematronValidityErrorFunc:
42 | * @ctx: the validation context
43 | * @msg: the message
44 | * @...: extra arguments
45 | *
46 | * Signature of an error callback from a Schematron validation
47 | */
48 | typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
49 |
50 | /**
51 | * xmlSchematronValidityWarningFunc:
52 | * @ctx: the validation context
53 | * @msg: the message
54 | * @...: extra arguments
55 | *
56 | * Signature of a warning callback from a Schematron validation
57 | */
58 | typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
59 |
60 | /**
61 | * A schemas validation context
62 | */
63 | typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
64 | typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
65 |
66 | typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
67 | typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
68 |
69 | /*
70 | * Interfaces for parsing.
71 | */
72 | XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
73 | xmlSchematronNewParserCtxt (const char *URL);
74 | XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
75 | xmlSchematronNewMemParserCtxt(const char *buffer,
76 | int size);
77 | XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
78 | xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
79 | XMLPUBFUN void XMLCALL
80 | xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
81 | /*****
82 | XMLPUBFUN void XMLCALL
83 | xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
84 | xmlSchematronValidityErrorFunc err,
85 | xmlSchematronValidityWarningFunc warn,
86 | void *ctx);
87 | XMLPUBFUN int XMLCALL
88 | xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
89 | xmlSchematronValidityErrorFunc * err,
90 | xmlSchematronValidityWarningFunc * warn,
91 | void **ctx);
92 | XMLPUBFUN int XMLCALL
93 | xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
94 | *****/
95 | XMLPUBFUN xmlSchematronPtr XMLCALL
96 | xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
97 | XMLPUBFUN void XMLCALL
98 | xmlSchematronFree (xmlSchematronPtr schema);
99 | /*
100 | * Interfaces for validating
101 | */
102 | XMLPUBFUN void XMLCALL
103 | xmlSchematronSetValidStructuredErrors(
104 | xmlSchematronValidCtxtPtr ctxt,
105 | xmlStructuredErrorFunc serror,
106 | void *ctx);
107 | /******
108 | XMLPUBFUN void XMLCALL
109 | xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
110 | xmlSchematronValidityErrorFunc err,
111 | xmlSchematronValidityWarningFunc warn,
112 | void *ctx);
113 | XMLPUBFUN int XMLCALL
114 | xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
115 | xmlSchematronValidityErrorFunc *err,
116 | xmlSchematronValidityWarningFunc *warn,
117 | void **ctx);
118 | XMLPUBFUN int XMLCALL
119 | xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
120 | int options);
121 | XMLPUBFUN int XMLCALL
122 | xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
123 | XMLPUBFUN int XMLCALL
124 | xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
125 | xmlNodePtr elem);
126 | *******/
127 |
128 | XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
129 | xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
130 | int options);
131 | XMLPUBFUN void XMLCALL
132 | xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
133 | XMLPUBFUN int XMLCALL
134 | xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
135 | xmlDocPtr instance);
136 |
137 | #ifdef __cplusplus
138 | }
139 | #endif
140 |
141 | #endif /* LIBXML_SCHEMATRON_ENABLED */
142 | #endif /* __XML_SCHEMATRON_H__ */
143 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/threads.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Summary: interfaces for thread handling
3 | * Description: set of generic threading related routines
4 | * should work with pthreads, Windows native or TLS threads
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __XML_THREADS_H__
12 | #define __XML_THREADS_H__
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | /*
21 | * xmlMutex are a simple mutual exception locks.
22 | */
23 | typedef struct _xmlMutex xmlMutex;
24 | typedef xmlMutex *xmlMutexPtr;
25 |
26 | /*
27 | * xmlRMutex are reentrant mutual exception locks.
28 | */
29 | typedef struct _xmlRMutex xmlRMutex;
30 | typedef xmlRMutex *xmlRMutexPtr;
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 | #include
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 | XMLPUBFUN xmlMutexPtr XMLCALL
40 | xmlNewMutex (void);
41 | XMLPUBFUN void XMLCALL
42 | xmlMutexLock (xmlMutexPtr tok);
43 | XMLPUBFUN void XMLCALL
44 | xmlMutexUnlock (xmlMutexPtr tok);
45 | XMLPUBFUN void XMLCALL
46 | xmlFreeMutex (xmlMutexPtr tok);
47 |
48 | XMLPUBFUN xmlRMutexPtr XMLCALL
49 | xmlNewRMutex (void);
50 | XMLPUBFUN void XMLCALL
51 | xmlRMutexLock (xmlRMutexPtr tok);
52 | XMLPUBFUN void XMLCALL
53 | xmlRMutexUnlock (xmlRMutexPtr tok);
54 | XMLPUBFUN void XMLCALL
55 | xmlFreeRMutex (xmlRMutexPtr tok);
56 |
57 | /*
58 | * Library wide APIs.
59 | */
60 | XMLPUBFUN void XMLCALL
61 | xmlInitThreads (void);
62 | XMLPUBFUN void XMLCALL
63 | xmlLockLibrary (void);
64 | XMLPUBFUN void XMLCALL
65 | xmlUnlockLibrary(void);
66 | XMLPUBFUN int XMLCALL
67 | xmlGetThreadId (void);
68 | XMLPUBFUN int XMLCALL
69 | xmlIsMainThread (void);
70 | XMLPUBFUN void XMLCALL
71 | xmlCleanupThreads(void);
72 | XMLPUBFUN xmlGlobalStatePtr XMLCALL
73 | xmlGetGlobalState(void);
74 |
75 | #if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
76 | int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
77 | #endif
78 |
79 | #ifdef __cplusplus
80 | }
81 | #endif
82 |
83 |
84 | #endif /* __XML_THREADS_H__ */
85 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/uri.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Summary: library of generic URI related routines
3 | * Description: library of generic URI related routines
4 | * Implements RFC 2396
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __XML_URI_H__
12 | #define __XML_URI_H__
13 |
14 | #include
15 | #include
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 |
21 | /**
22 | * xmlURI:
23 | *
24 | * A parsed URI reference. This is a struct containing the various fields
25 | * as described in RFC 2396 but separated for further processing.
26 | *
27 | * Note: query is a deprecated field which is incorrectly unescaped.
28 | * query_raw takes precedence over query if the former is set.
29 | * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
30 | */
31 | typedef struct _xmlURI xmlURI;
32 | typedef xmlURI *xmlURIPtr;
33 | struct _xmlURI {
34 | char *scheme; /* the URI scheme */
35 | char *opaque; /* opaque part */
36 | char *authority; /* the authority part */
37 | char *server; /* the server part */
38 | char *user; /* the user part */
39 | int port; /* the port number */
40 | char *path; /* the path string */
41 | char *query; /* the query string (deprecated - use with caution) */
42 | char *fragment; /* the fragment identifier */
43 | int cleanup; /* parsing potentially unclean URI */
44 | char *query_raw; /* the query string (as it appears in the URI) */
45 | };
46 |
47 | /*
48 | * This function is in tree.h:
49 | * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
50 | * xmlNodePtr cur);
51 | */
52 | XMLPUBFUN xmlURIPtr XMLCALL
53 | xmlCreateURI (void);
54 | XMLPUBFUN xmlChar * XMLCALL
55 | xmlBuildURI (const xmlChar *URI,
56 | const xmlChar *base);
57 | XMLPUBFUN xmlChar * XMLCALL
58 | xmlBuildRelativeURI (const xmlChar *URI,
59 | const xmlChar *base);
60 | XMLPUBFUN xmlURIPtr XMLCALL
61 | xmlParseURI (const char *str);
62 | XMLPUBFUN xmlURIPtr XMLCALL
63 | xmlParseURIRaw (const char *str,
64 | int raw);
65 | XMLPUBFUN int XMLCALL
66 | xmlParseURIReference (xmlURIPtr uri,
67 | const char *str);
68 | XMLPUBFUN xmlChar * XMLCALL
69 | xmlSaveUri (xmlURIPtr uri);
70 | XMLPUBFUN void XMLCALL
71 | xmlPrintURI (FILE *stream,
72 | xmlURIPtr uri);
73 | XMLPUBFUN xmlChar * XMLCALL
74 | xmlURIEscapeStr (const xmlChar *str,
75 | const xmlChar *list);
76 | XMLPUBFUN char * XMLCALL
77 | xmlURIUnescapeString (const char *str,
78 | int len,
79 | char *target);
80 | XMLPUBFUN int XMLCALL
81 | xmlNormalizeURIPath (char *path);
82 | XMLPUBFUN xmlChar * XMLCALL
83 | xmlURIEscape (const xmlChar *str);
84 | XMLPUBFUN void XMLCALL
85 | xmlFreeURI (xmlURIPtr uri);
86 | XMLPUBFUN xmlChar* XMLCALL
87 | xmlCanonicPath (const xmlChar *path);
88 | XMLPUBFUN xmlChar* XMLCALL
89 | xmlPathToURI (const xmlChar *path);
90 |
91 | #ifdef __cplusplus
92 | }
93 | #endif
94 | #endif /* __XML_URI_H__ */
95 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xinclude.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: implementation of XInclude
3 | * Description: API to handle XInclude processing,
4 | * implements the
5 | * World Wide Web Consortium Last Call Working Draft 10 November 2003
6 | * http://www.w3.org/TR/2003/WD-xinclude-20031110
7 | *
8 | * Copy: See Copyright for the status of this software.
9 | *
10 | * Author: Daniel Veillard
11 | */
12 |
13 | #ifndef __XML_XINCLUDE_H__
14 | #define __XML_XINCLUDE_H__
15 |
16 | #include
17 | #include
18 |
19 | #ifdef LIBXML_XINCLUDE_ENABLED
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | /**
26 | * XINCLUDE_NS:
27 | *
28 | * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
29 | */
30 | #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
31 | /**
32 | * XINCLUDE_OLD_NS:
33 | *
34 | * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
35 | */
36 | #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
37 | /**
38 | * XINCLUDE_NODE:
39 | *
40 | * Macro defining "include"
41 | */
42 | #define XINCLUDE_NODE (const xmlChar *) "include"
43 | /**
44 | * XINCLUDE_FALLBACK:
45 | *
46 | * Macro defining "fallback"
47 | */
48 | #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
49 | /**
50 | * XINCLUDE_HREF:
51 | *
52 | * Macro defining "href"
53 | */
54 | #define XINCLUDE_HREF (const xmlChar *) "href"
55 | /**
56 | * XINCLUDE_PARSE:
57 | *
58 | * Macro defining "parse"
59 | */
60 | #define XINCLUDE_PARSE (const xmlChar *) "parse"
61 | /**
62 | * XINCLUDE_PARSE_XML:
63 | *
64 | * Macro defining "xml"
65 | */
66 | #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
67 | /**
68 | * XINCLUDE_PARSE_TEXT:
69 | *
70 | * Macro defining "text"
71 | */
72 | #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
73 | /**
74 | * XINCLUDE_PARSE_ENCODING:
75 | *
76 | * Macro defining "encoding"
77 | */
78 | #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
79 | /**
80 | * XINCLUDE_PARSE_XPOINTER:
81 | *
82 | * Macro defining "xpointer"
83 | */
84 | #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
85 |
86 | typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
87 | typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
88 |
89 | /*
90 | * standalone processing
91 | */
92 | XMLPUBFUN int XMLCALL
93 | xmlXIncludeProcess (xmlDocPtr doc);
94 | XMLPUBFUN int XMLCALL
95 | xmlXIncludeProcessFlags (xmlDocPtr doc,
96 | int flags);
97 | XMLPUBFUN int XMLCALL
98 | xmlXIncludeProcessFlagsData(xmlDocPtr doc,
99 | int flags,
100 | void *data);
101 | XMLPUBFUN int XMLCALL
102 | xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
103 | int flags,
104 | void *data);
105 | XMLPUBFUN int XMLCALL
106 | xmlXIncludeProcessTree (xmlNodePtr tree);
107 | XMLPUBFUN int XMLCALL
108 | xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
109 | int flags);
110 | /*
111 | * contextual processing
112 | */
113 | XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
114 | xmlXIncludeNewContext (xmlDocPtr doc);
115 | XMLPUBFUN int XMLCALL
116 | xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
117 | int flags);
118 | XMLPUBFUN void XMLCALL
119 | xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
120 | XMLPUBFUN int XMLCALL
121 | xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
122 | xmlNodePtr tree);
123 | #ifdef __cplusplus
124 | }
125 | #endif
126 |
127 | #endif /* LIBXML_XINCLUDE_ENABLED */
128 |
129 | #endif /* __XML_XINCLUDE_H__ */
130 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xlink.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: unfinished XLink detection module
3 | * Description: unfinished XLink detection module
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Daniel Veillard
8 | */
9 |
10 | #ifndef __XML_XLINK_H__
11 | #define __XML_XLINK_H__
12 |
13 | #include
14 | #include
15 |
16 | #ifdef LIBXML_XPTR_ENABLED
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 |
22 | /**
23 | * Various defines for the various Link properties.
24 | *
25 | * NOTE: the link detection layer will try to resolve QName expansion
26 | * of namespaces. If "foo" is the prefix for "http://foo.com/"
27 | * then the link detection layer will expand role="foo:myrole"
28 | * to "http://foo.com/:myrole".
29 | * NOTE: the link detection layer will expand URI-Refences found on
30 | * href attributes by using the base mechanism if found.
31 | */
32 | typedef xmlChar *xlinkHRef;
33 | typedef xmlChar *xlinkRole;
34 | typedef xmlChar *xlinkTitle;
35 |
36 | typedef enum {
37 | XLINK_TYPE_NONE = 0,
38 | XLINK_TYPE_SIMPLE,
39 | XLINK_TYPE_EXTENDED,
40 | XLINK_TYPE_EXTENDED_SET
41 | } xlinkType;
42 |
43 | typedef enum {
44 | XLINK_SHOW_NONE = 0,
45 | XLINK_SHOW_NEW,
46 | XLINK_SHOW_EMBED,
47 | XLINK_SHOW_REPLACE
48 | } xlinkShow;
49 |
50 | typedef enum {
51 | XLINK_ACTUATE_NONE = 0,
52 | XLINK_ACTUATE_AUTO,
53 | XLINK_ACTUATE_ONREQUEST
54 | } xlinkActuate;
55 |
56 | /**
57 | * xlinkNodeDetectFunc:
58 | * @ctx: user data pointer
59 | * @node: the node to check
60 | *
61 | * This is the prototype for the link detection routine.
62 | * It calls the default link detection callbacks upon link detection.
63 | */
64 | typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
65 |
66 | /*
67 | * The link detection module interact with the upper layers using
68 | * a set of callback registered at parsing time.
69 | */
70 |
71 | /**
72 | * xlinkSimpleLinkFunk:
73 | * @ctx: user data pointer
74 | * @node: the node carrying the link
75 | * @href: the target of the link
76 | * @role: the role string
77 | * @title: the link title
78 | *
79 | * This is the prototype for a simple link detection callback.
80 | */
81 | typedef void
82 | (*xlinkSimpleLinkFunk) (void *ctx,
83 | xmlNodePtr node,
84 | const xlinkHRef href,
85 | const xlinkRole role,
86 | const xlinkTitle title);
87 |
88 | /**
89 | * xlinkExtendedLinkFunk:
90 | * @ctx: user data pointer
91 | * @node: the node carrying the link
92 | * @nbLocators: the number of locators detected on the link
93 | * @hrefs: pointer to the array of locator hrefs
94 | * @roles: pointer to the array of locator roles
95 | * @nbArcs: the number of arcs detected on the link
96 | * @from: pointer to the array of source roles found on the arcs
97 | * @to: pointer to the array of target roles found on the arcs
98 | * @show: array of values for the show attributes found on the arcs
99 | * @actuate: array of values for the actuate attributes found on the arcs
100 | * @nbTitles: the number of titles detected on the link
101 | * @title: array of titles detected on the link
102 | * @langs: array of xml:lang values for the titles
103 | *
104 | * This is the prototype for a extended link detection callback.
105 | */
106 | typedef void
107 | (*xlinkExtendedLinkFunk)(void *ctx,
108 | xmlNodePtr node,
109 | int nbLocators,
110 | const xlinkHRef *hrefs,
111 | const xlinkRole *roles,
112 | int nbArcs,
113 | const xlinkRole *from,
114 | const xlinkRole *to,
115 | xlinkShow *show,
116 | xlinkActuate *actuate,
117 | int nbTitles,
118 | const xlinkTitle *titles,
119 | const xmlChar **langs);
120 |
121 | /**
122 | * xlinkExtendedLinkSetFunk:
123 | * @ctx: user data pointer
124 | * @node: the node carrying the link
125 | * @nbLocators: the number of locators detected on the link
126 | * @hrefs: pointer to the array of locator hrefs
127 | * @roles: pointer to the array of locator roles
128 | * @nbTitles: the number of titles detected on the link
129 | * @title: array of titles detected on the link
130 | * @langs: array of xml:lang values for the titles
131 | *
132 | * This is the prototype for a extended link set detection callback.
133 | */
134 | typedef void
135 | (*xlinkExtendedLinkSetFunk) (void *ctx,
136 | xmlNodePtr node,
137 | int nbLocators,
138 | const xlinkHRef *hrefs,
139 | const xlinkRole *roles,
140 | int nbTitles,
141 | const xlinkTitle *titles,
142 | const xmlChar **langs);
143 |
144 | /**
145 | * This is the structure containing a set of Links detection callbacks.
146 | *
147 | * There is no default xlink callbacks, if one want to get link
148 | * recognition activated, those call backs must be provided before parsing.
149 | */
150 | typedef struct _xlinkHandler xlinkHandler;
151 | typedef xlinkHandler *xlinkHandlerPtr;
152 | struct _xlinkHandler {
153 | xlinkSimpleLinkFunk simple;
154 | xlinkExtendedLinkFunk extended;
155 | xlinkExtendedLinkSetFunk set;
156 | };
157 |
158 | /*
159 | * The default detection routine, can be overridden, they call the default
160 | * detection callbacks.
161 | */
162 |
163 | XMLPUBFUN xlinkNodeDetectFunc XMLCALL
164 | xlinkGetDefaultDetect (void);
165 | XMLPUBFUN void XMLCALL
166 | xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
167 |
168 | /*
169 | * Routines to set/get the default handlers.
170 | */
171 | XMLPUBFUN xlinkHandlerPtr XMLCALL
172 | xlinkGetDefaultHandler (void);
173 | XMLPUBFUN void XMLCALL
174 | xlinkSetDefaultHandler (xlinkHandlerPtr handler);
175 |
176 | /*
177 | * Link detection module itself.
178 | */
179 | XMLPUBFUN xlinkType XMLCALL
180 | xlinkIsLink (xmlDocPtr doc,
181 | xmlNodePtr node);
182 |
183 | #ifdef __cplusplus
184 | }
185 | #endif
186 |
187 | #endif /* LIBXML_XPTR_ENABLED */
188 |
189 | #endif /* __XML_XLINK_H__ */
190 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlautomata.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: API to build regexp automata
3 | * Description: the API to build regexp automata
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Daniel Veillard
8 | */
9 |
10 | #ifndef __XML_AUTOMATA_H__
11 | #define __XML_AUTOMATA_H__
12 |
13 | #include
14 | #include
15 |
16 | #ifdef LIBXML_REGEXP_ENABLED
17 | #ifdef LIBXML_AUTOMATA_ENABLED
18 | #include
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | /**
25 | * xmlAutomataPtr:
26 | *
27 | * A libxml automata description, It can be compiled into a regexp
28 | */
29 | typedef struct _xmlAutomata xmlAutomata;
30 | typedef xmlAutomata *xmlAutomataPtr;
31 |
32 | /**
33 | * xmlAutomataStatePtr:
34 | *
35 | * A state int the automata description,
36 | */
37 | typedef struct _xmlAutomataState xmlAutomataState;
38 | typedef xmlAutomataState *xmlAutomataStatePtr;
39 |
40 | /*
41 | * Building API
42 | */
43 | XMLPUBFUN xmlAutomataPtr XMLCALL
44 | xmlNewAutomata (void);
45 | XMLPUBFUN void XMLCALL
46 | xmlFreeAutomata (xmlAutomataPtr am);
47 |
48 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
49 | xmlAutomataGetInitState (xmlAutomataPtr am);
50 | XMLPUBFUN int XMLCALL
51 | xmlAutomataSetFinalState (xmlAutomataPtr am,
52 | xmlAutomataStatePtr state);
53 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
54 | xmlAutomataNewState (xmlAutomataPtr am);
55 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
56 | xmlAutomataNewTransition (xmlAutomataPtr am,
57 | xmlAutomataStatePtr from,
58 | xmlAutomataStatePtr to,
59 | const xmlChar *token,
60 | void *data);
61 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
62 | xmlAutomataNewTransition2 (xmlAutomataPtr am,
63 | xmlAutomataStatePtr from,
64 | xmlAutomataStatePtr to,
65 | const xmlChar *token,
66 | const xmlChar *token2,
67 | void *data);
68 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
69 | xmlAutomataNewNegTrans (xmlAutomataPtr am,
70 | xmlAutomataStatePtr from,
71 | xmlAutomataStatePtr to,
72 | const xmlChar *token,
73 | const xmlChar *token2,
74 | void *data);
75 |
76 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
77 | xmlAutomataNewCountTrans (xmlAutomataPtr am,
78 | xmlAutomataStatePtr from,
79 | xmlAutomataStatePtr to,
80 | const xmlChar *token,
81 | int min,
82 | int max,
83 | void *data);
84 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
85 | xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
86 | xmlAutomataStatePtr from,
87 | xmlAutomataStatePtr to,
88 | const xmlChar *token,
89 | const xmlChar *token2,
90 | int min,
91 | int max,
92 | void *data);
93 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
94 | xmlAutomataNewOnceTrans (xmlAutomataPtr am,
95 | xmlAutomataStatePtr from,
96 | xmlAutomataStatePtr to,
97 | const xmlChar *token,
98 | int min,
99 | int max,
100 | void *data);
101 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
102 | xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
103 | xmlAutomataStatePtr from,
104 | xmlAutomataStatePtr to,
105 | const xmlChar *token,
106 | const xmlChar *token2,
107 | int min,
108 | int max,
109 | void *data);
110 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
111 | xmlAutomataNewAllTrans (xmlAutomataPtr am,
112 | xmlAutomataStatePtr from,
113 | xmlAutomataStatePtr to,
114 | int lax);
115 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
116 | xmlAutomataNewEpsilon (xmlAutomataPtr am,
117 | xmlAutomataStatePtr from,
118 | xmlAutomataStatePtr to);
119 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
120 | xmlAutomataNewCountedTrans (xmlAutomataPtr am,
121 | xmlAutomataStatePtr from,
122 | xmlAutomataStatePtr to,
123 | int counter);
124 | XMLPUBFUN xmlAutomataStatePtr XMLCALL
125 | xmlAutomataNewCounterTrans (xmlAutomataPtr am,
126 | xmlAutomataStatePtr from,
127 | xmlAutomataStatePtr to,
128 | int counter);
129 | XMLPUBFUN int XMLCALL
130 | xmlAutomataNewCounter (xmlAutomataPtr am,
131 | int min,
132 | int max);
133 |
134 | XMLPUBFUN xmlRegexpPtr XMLCALL
135 | xmlAutomataCompile (xmlAutomataPtr am);
136 | XMLPUBFUN int XMLCALL
137 | xmlAutomataIsDeterminist (xmlAutomataPtr am);
138 |
139 | #ifdef __cplusplus
140 | }
141 | #endif
142 |
143 | #endif /* LIBXML_AUTOMATA_ENABLED */
144 | #endif /* LIBXML_REGEXP_ENABLED */
145 |
146 | #endif /* __XML_AUTOMATA_H__ */
147 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlexports.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: macros for marking symbols as exportable/importable.
3 | * Description: macros for marking symbols as exportable/importable.
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Igor Zlatovic
8 | */
9 |
10 | #ifndef __XML_EXPORTS_H__
11 | #define __XML_EXPORTS_H__
12 |
13 | /**
14 | * XMLPUBFUN, XMLPUBVAR, XMLCALL
15 | *
16 | * Macros which declare an exportable function, an exportable variable and
17 | * the calling convention used for functions.
18 | *
19 | * Please use an extra block for every platform/compiler combination when
20 | * modifying this, rather than overlong #ifdef lines. This helps
21 | * readability as well as the fact that different compilers on the same
22 | * platform might need different definitions.
23 | */
24 |
25 | /**
26 | * XMLPUBFUN:
27 | *
28 | * Macros which declare an exportable function
29 | */
30 | #define XMLPUBFUN
31 | /**
32 | * XMLPUBVAR:
33 | *
34 | * Macros which declare an exportable variable
35 | */
36 | #define XMLPUBVAR extern
37 | /**
38 | * XMLCALL:
39 | *
40 | * Macros which declare the called convention for exported functions
41 | */
42 | #define XMLCALL
43 | /**
44 | * XMLCDECL:
45 | *
46 | * Macro which declares the calling convention for exported functions that
47 | * use '...'.
48 | */
49 | #define XMLCDECL
50 |
51 | /** DOC_DISABLE */
52 |
53 | /* Windows platform with MS compiler */
54 | #if defined(_WIN32) && defined(_MSC_VER)
55 | #undef XMLPUBFUN
56 | #undef XMLPUBVAR
57 | #undef XMLCALL
58 | #undef XMLCDECL
59 | #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
60 | #define XMLPUBFUN __declspec(dllexport)
61 | #define XMLPUBVAR __declspec(dllexport)
62 | #else
63 | #define XMLPUBFUN
64 | #if !defined(LIBXML_STATIC)
65 | #define XMLPUBVAR __declspec(dllimport) extern
66 | #else
67 | #define XMLPUBVAR extern
68 | #endif
69 | #endif
70 | #if defined(LIBXML_FASTCALL)
71 | #define XMLCALL __fastcall
72 | #else
73 | #define XMLCALL __cdecl
74 | #endif
75 | #define XMLCDECL __cdecl
76 | #if !defined _REENTRANT
77 | #define _REENTRANT
78 | #endif
79 | #endif
80 |
81 | /* Windows platform with Borland compiler */
82 | #if defined(_WIN32) && defined(__BORLANDC__)
83 | #undef XMLPUBFUN
84 | #undef XMLPUBVAR
85 | #undef XMLCALL
86 | #undef XMLCDECL
87 | #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
88 | #define XMLPUBFUN __declspec(dllexport)
89 | #define XMLPUBVAR __declspec(dllexport) extern
90 | #else
91 | #define XMLPUBFUN
92 | #if !defined(LIBXML_STATIC)
93 | #define XMLPUBVAR __declspec(dllimport) extern
94 | #else
95 | #define XMLPUBVAR extern
96 | #endif
97 | #endif
98 | #define XMLCALL __cdecl
99 | #define XMLCDECL __cdecl
100 | #if !defined _REENTRANT
101 | #define _REENTRANT
102 | #endif
103 | #endif
104 |
105 | /* Windows platform with GNU compiler (Mingw) */
106 | #if defined(_WIN32) && defined(__MINGW32__)
107 | #undef XMLPUBFUN
108 | #undef XMLPUBVAR
109 | #undef XMLCALL
110 | #undef XMLCDECL
111 | /*
112 | * if defined(IN_LIBXML) this raises problems on mingw with msys
113 | * _imp__xmlFree listed as missing. Try to workaround the problem
114 | * by also making that declaration when compiling client code.
115 | */
116 | #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
117 | #define XMLPUBFUN __declspec(dllexport)
118 | #define XMLPUBVAR __declspec(dllexport) extern
119 | #else
120 | #define XMLPUBFUN
121 | #if !defined(LIBXML_STATIC)
122 | #define XMLPUBVAR __declspec(dllimport) extern
123 | #else
124 | #define XMLPUBVAR extern
125 | #endif
126 | #endif
127 | #define XMLCALL __cdecl
128 | #define XMLCDECL __cdecl
129 | #if !defined _REENTRANT
130 | #define _REENTRANT
131 | #endif
132 | #endif
133 |
134 | /* Cygwin platform, GNU compiler */
135 | #if defined(_WIN32) && defined(__CYGWIN__)
136 | #undef XMLPUBFUN
137 | #undef XMLPUBVAR
138 | #undef XMLCALL
139 | #undef XMLCDECL
140 | #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
141 | #define XMLPUBFUN __declspec(dllexport)
142 | #define XMLPUBVAR __declspec(dllexport)
143 | #else
144 | #define XMLPUBFUN
145 | #if !defined(LIBXML_STATIC)
146 | #define XMLPUBVAR __declspec(dllimport) extern
147 | #else
148 | #define XMLPUBVAR
149 | #endif
150 | #endif
151 | #define XMLCALL __cdecl
152 | #define XMLCDECL __cdecl
153 | #endif
154 |
155 | /* Compatibility */
156 | #if !defined(LIBXML_DLL_IMPORT)
157 | #define LIBXML_DLL_IMPORT XMLPUBVAR
158 | #endif
159 |
160 | #endif /* __XML_EXPORTS_H__ */
161 |
162 |
163 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlmemory.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: interface for the memory allocator
3 | * Description: provides interfaces for the memory allocator,
4 | * including debugging capabilities.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 |
12 | #ifndef __DEBUG_MEMORY_ALLOC__
13 | #define __DEBUG_MEMORY_ALLOC__
14 |
15 | #include
16 | #include
17 |
18 | /**
19 | * DEBUG_MEMORY:
20 | *
21 | * DEBUG_MEMORY replaces the allocator with a collect and debug
22 | * shell to the libc allocator.
23 | * DEBUG_MEMORY should only be activated when debugging
24 | * libxml i.e. if libxml has been configured with --with-debug-mem too.
25 | */
26 | /* #define DEBUG_MEMORY_FREED */
27 | /* #define DEBUG_MEMORY_LOCATION */
28 |
29 | #ifdef DEBUG
30 | #ifndef DEBUG_MEMORY
31 | #define DEBUG_MEMORY
32 | #endif
33 | #endif
34 |
35 | /**
36 | * DEBUG_MEMORY_LOCATION:
37 | *
38 | * DEBUG_MEMORY_LOCATION should be activated only when debugging
39 | * libxml i.e. if libxml has been configured with --with-debug-mem too.
40 | */
41 | #ifdef DEBUG_MEMORY_LOCATION
42 | #endif
43 |
44 | #ifdef __cplusplus
45 | extern "C" {
46 | #endif
47 |
48 | /*
49 | * The XML memory wrapper support 4 basic overloadable functions.
50 | */
51 | /**
52 | * xmlFreeFunc:
53 | * @mem: an already allocated block of memory
54 | *
55 | * Signature for a free() implementation.
56 | */
57 | typedef void (XMLCALL *xmlFreeFunc)(void *mem);
58 | /**
59 | * xmlMallocFunc:
60 | * @size: the size requested in bytes
61 | *
62 | * Signature for a malloc() implementation.
63 | *
64 | * Returns a pointer to the newly allocated block or NULL in case of error.
65 | */
66 | typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
67 |
68 | /**
69 | * xmlReallocFunc:
70 | * @mem: an already allocated block of memory
71 | * @size: the new size requested in bytes
72 | *
73 | * Signature for a realloc() implementation.
74 | *
75 | * Returns a pointer to the newly reallocated block or NULL in case of error.
76 | */
77 | typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
78 |
79 | /**
80 | * xmlStrdupFunc:
81 | * @str: a zero terminated string
82 | *
83 | * Signature for an strdup() implementation.
84 | *
85 | * Returns the copy of the string or NULL in case of error.
86 | */
87 | typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
88 |
89 | /*
90 | * The 4 interfaces used for all memory handling within libxml.
91 | LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
92 | LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
93 | LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
94 | LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
95 | LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
96 | */
97 |
98 | /*
99 | * The way to overload the existing functions.
100 | * The xmlGc function have an extra entry for atomic block
101 | * allocations useful for garbage collected memory allocators
102 | */
103 | XMLPUBFUN int XMLCALL
104 | xmlMemSetup (xmlFreeFunc freeFunc,
105 | xmlMallocFunc mallocFunc,
106 | xmlReallocFunc reallocFunc,
107 | xmlStrdupFunc strdupFunc);
108 | XMLPUBFUN int XMLCALL
109 | xmlMemGet (xmlFreeFunc *freeFunc,
110 | xmlMallocFunc *mallocFunc,
111 | xmlReallocFunc *reallocFunc,
112 | xmlStrdupFunc *strdupFunc);
113 | XMLPUBFUN int XMLCALL
114 | xmlGcMemSetup (xmlFreeFunc freeFunc,
115 | xmlMallocFunc mallocFunc,
116 | xmlMallocFunc mallocAtomicFunc,
117 | xmlReallocFunc reallocFunc,
118 | xmlStrdupFunc strdupFunc);
119 | XMLPUBFUN int XMLCALL
120 | xmlGcMemGet (xmlFreeFunc *freeFunc,
121 | xmlMallocFunc *mallocFunc,
122 | xmlMallocFunc *mallocAtomicFunc,
123 | xmlReallocFunc *reallocFunc,
124 | xmlStrdupFunc *strdupFunc);
125 |
126 | /*
127 | * Initialization of the memory layer.
128 | */
129 | XMLPUBFUN int XMLCALL
130 | xmlInitMemory (void);
131 |
132 | /*
133 | * Cleanup of the memory layer.
134 | */
135 | XMLPUBFUN void XMLCALL
136 | xmlCleanupMemory (void);
137 | /*
138 | * These are specific to the XML debug memory wrapper.
139 | */
140 | XMLPUBFUN int XMLCALL
141 | xmlMemUsed (void);
142 | XMLPUBFUN int XMLCALL
143 | xmlMemBlocks (void);
144 | XMLPUBFUN void XMLCALL
145 | xmlMemDisplay (FILE *fp);
146 | XMLPUBFUN void XMLCALL
147 | xmlMemDisplayLast(FILE *fp, long nbBytes);
148 | XMLPUBFUN void XMLCALL
149 | xmlMemShow (FILE *fp, int nr);
150 | XMLPUBFUN void XMLCALL
151 | xmlMemoryDump (void);
152 | XMLPUBFUN void * XMLCALL
153 | xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
154 | XMLPUBFUN void * XMLCALL
155 | xmlMemRealloc (void *ptr,size_t size);
156 | XMLPUBFUN void XMLCALL
157 | xmlMemFree (void *ptr);
158 | XMLPUBFUN char * XMLCALL
159 | xmlMemoryStrdup (const char *str);
160 | XMLPUBFUN void * XMLCALL
161 | xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
162 | XMLPUBFUN void * XMLCALL
163 | xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
164 | XMLPUBFUN void * XMLCALL
165 | xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
166 | XMLPUBFUN char * XMLCALL
167 | xmlMemStrdupLoc (const char *str, const char *file, int line);
168 |
169 |
170 | #ifdef DEBUG_MEMORY_LOCATION
171 | /**
172 | * xmlMalloc:
173 | * @size: number of bytes to allocate
174 | *
175 | * Wrapper for the malloc() function used in the XML library.
176 | *
177 | * Returns the pointer to the allocated area or NULL in case of error.
178 | */
179 | #define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
180 | /**
181 | * xmlMallocAtomic:
182 | * @size: number of bytes to allocate
183 | *
184 | * Wrapper for the malloc() function used in the XML library for allocation
185 | * of block not containing pointers to other areas.
186 | *
187 | * Returns the pointer to the allocated area or NULL in case of error.
188 | */
189 | #define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
190 | /**
191 | * xmlRealloc:
192 | * @ptr: pointer to the existing allocated area
193 | * @size: number of bytes to allocate
194 | *
195 | * Wrapper for the realloc() function used in the XML library.
196 | *
197 | * Returns the pointer to the allocated area or NULL in case of error.
198 | */
199 | #define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
200 | /**
201 | * xmlMemStrdup:
202 | * @str: pointer to the existing string
203 | *
204 | * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
205 | *
206 | * Returns the pointer to the allocated area or NULL in case of error.
207 | */
208 | #define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
209 |
210 | #endif /* DEBUG_MEMORY_LOCATION */
211 |
212 | #ifdef __cplusplus
213 | }
214 | #endif /* __cplusplus */
215 |
216 | #ifndef __XML_GLOBALS_H
217 | #ifndef __XML_THREADS_H__
218 | #include
219 | #include
220 | #endif
221 | #endif
222 |
223 | #endif /* __DEBUG_MEMORY_ALLOC__ */
224 |
225 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlmodule.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: dynamic module loading
3 | * Description: basic API for dynamic module loading, used by
4 | * libexslt added in 2.6.17
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Joel W. Reed
9 | */
10 |
11 | #ifndef __XML_MODULE_H__
12 | #define __XML_MODULE_H__
13 |
14 | #include
15 |
16 | #ifdef LIBXML_MODULES_ENABLED
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 |
22 | /**
23 | * xmlModulePtr:
24 | *
25 | * A handle to a dynamically loaded module
26 | */
27 | typedef struct _xmlModule xmlModule;
28 | typedef xmlModule *xmlModulePtr;
29 |
30 | /**
31 | * xmlModuleOption:
32 | *
33 | * enumeration of options that can be passed down to xmlModuleOpen()
34 | */
35 | typedef enum {
36 | XML_MODULE_LAZY = 1, /* lazy binding */
37 | XML_MODULE_LOCAL= 2 /* local binding */
38 | } xmlModuleOption;
39 |
40 | XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
41 | int options);
42 |
43 | XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
44 | const char* name,
45 | void **result);
46 |
47 | XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
48 |
49 | XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
50 |
51 | #ifdef __cplusplus
52 | }
53 | #endif
54 |
55 | #endif /* LIBXML_MODULES_ENABLED */
56 |
57 | #endif /*__XML_MODULE_H__ */
58 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlregexp.h:
--------------------------------------------------------------------------------
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
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
43 | #include
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__ */
223 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlsave.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: the XML document serializer
3 | * Description: API to save document or subtree of document
4 | *
5 | * Copy: See Copyright for the status of this software.
6 | *
7 | * Author: Daniel Veillard
8 | */
9 |
10 | #ifndef __XML_XMLSAVE_H__
11 | #define __XML_XMLSAVE_H__
12 |
13 | #include
14 | #include
15 | #include
16 | #include
17 |
18 | #ifdef LIBXML_OUTPUT_ENABLED
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | /**
24 | * xmlSaveOption:
25 | *
26 | * This is the set of XML save options that can be passed down
27 | * to the xmlSaveToFd() and similar calls.
28 | */
29 | typedef enum {
30 | XML_SAVE_FORMAT = 1<<0, /* format save output */
31 | XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
32 | XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
33 | XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
34 | XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
35 | XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
36 | XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
37 | XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
38 | } xmlSaveOption;
39 |
40 |
41 | typedef struct _xmlSaveCtxt xmlSaveCtxt;
42 | typedef xmlSaveCtxt *xmlSaveCtxtPtr;
43 |
44 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL
45 | xmlSaveToFd (int fd,
46 | const char *encoding,
47 | int options);
48 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL
49 | xmlSaveToFilename (const char *filename,
50 | const char *encoding,
51 | int options);
52 |
53 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL
54 | xmlSaveToBuffer (xmlBufferPtr buffer,
55 | const char *encoding,
56 | int options);
57 |
58 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL
59 | xmlSaveToIO (xmlOutputWriteCallback iowrite,
60 | xmlOutputCloseCallback ioclose,
61 | void *ioctx,
62 | const char *encoding,
63 | int options);
64 |
65 | XMLPUBFUN long XMLCALL
66 | xmlSaveDoc (xmlSaveCtxtPtr ctxt,
67 | xmlDocPtr doc);
68 | XMLPUBFUN long XMLCALL
69 | xmlSaveTree (xmlSaveCtxtPtr ctxt,
70 | xmlNodePtr node);
71 |
72 | XMLPUBFUN int XMLCALL
73 | xmlSaveFlush (xmlSaveCtxtPtr ctxt);
74 | XMLPUBFUN int XMLCALL
75 | xmlSaveClose (xmlSaveCtxtPtr ctxt);
76 | XMLPUBFUN int XMLCALL
77 | xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
78 | xmlCharEncodingOutputFunc escape);
79 | XMLPUBFUN int XMLCALL
80 | xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
81 | xmlCharEncodingOutputFunc escape);
82 | #ifdef __cplusplus
83 | }
84 | #endif
85 | #endif /* LIBXML_OUTPUT_ENABLED */
86 | #endif /* __XML_XMLSAVE_H__ */
87 |
88 |
89 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlschemastypes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: implementation of XML Schema Datatypes
3 | * Description: module providing the XML Schema Datatypes implementation
4 | * both definition and validity checking
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 |
12 | #ifndef __XML_SCHEMA_TYPES_H__
13 | #define __XML_SCHEMA_TYPES_H__
14 |
15 | #include
16 |
17 | #ifdef LIBXML_SCHEMAS_ENABLED
18 |
19 | #include
20 | #include
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | typedef enum {
27 | XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
28 | XML_SCHEMA_WHITESPACE_PRESERVE = 1,
29 | XML_SCHEMA_WHITESPACE_REPLACE = 2,
30 | XML_SCHEMA_WHITESPACE_COLLAPSE = 3
31 | } xmlSchemaWhitespaceValueType;
32 |
33 | XMLPUBFUN void XMLCALL
34 | xmlSchemaInitTypes (void);
35 | XMLPUBFUN void XMLCALL
36 | xmlSchemaCleanupTypes (void);
37 | XMLPUBFUN xmlSchemaTypePtr XMLCALL
38 | xmlSchemaGetPredefinedType (const xmlChar *name,
39 | const xmlChar *ns);
40 | XMLPUBFUN int XMLCALL
41 | xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
42 | const xmlChar *value,
43 | xmlSchemaValPtr *val);
44 | XMLPUBFUN int XMLCALL
45 | xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
46 | const xmlChar *value,
47 | xmlSchemaValPtr *val,
48 | xmlNodePtr node);
49 | XMLPUBFUN int XMLCALL
50 | xmlSchemaValidateFacet (xmlSchemaTypePtr base,
51 | xmlSchemaFacetPtr facet,
52 | const xmlChar *value,
53 | xmlSchemaValPtr val);
54 | XMLPUBFUN int XMLCALL
55 | xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
56 | xmlSchemaWhitespaceValueType fws,
57 | xmlSchemaValType valType,
58 | const xmlChar *value,
59 | xmlSchemaValPtr val,
60 | xmlSchemaWhitespaceValueType ws);
61 | XMLPUBFUN void XMLCALL
62 | xmlSchemaFreeValue (xmlSchemaValPtr val);
63 | XMLPUBFUN xmlSchemaFacetPtr XMLCALL
64 | xmlSchemaNewFacet (void);
65 | XMLPUBFUN int XMLCALL
66 | xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
67 | xmlSchemaTypePtr typeDecl,
68 | xmlSchemaParserCtxtPtr ctxt,
69 | const xmlChar *name);
70 | XMLPUBFUN void XMLCALL
71 | xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
72 | XMLPUBFUN int XMLCALL
73 | xmlSchemaCompareValues (xmlSchemaValPtr x,
74 | xmlSchemaValPtr y);
75 | XMLPUBFUN xmlSchemaTypePtr XMLCALL
76 | xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
77 | XMLPUBFUN int XMLCALL
78 | xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
79 | const xmlChar *value,
80 | unsigned long actualLen,
81 | unsigned long *expectedLen);
82 | XMLPUBFUN xmlSchemaTypePtr XMLCALL
83 | xmlSchemaGetBuiltInType (xmlSchemaValType type);
84 | XMLPUBFUN int XMLCALL
85 | xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
86 | int facetType);
87 | XMLPUBFUN xmlChar * XMLCALL
88 | xmlSchemaCollapseString (const xmlChar *value);
89 | XMLPUBFUN xmlChar * XMLCALL
90 | xmlSchemaWhiteSpaceReplace (const xmlChar *value);
91 | XMLPUBFUN unsigned long XMLCALL
92 | xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
93 | XMLPUBFUN int XMLCALL
94 | xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
95 | xmlSchemaFacetPtr facet,
96 | const xmlChar *value,
97 | xmlSchemaValPtr val,
98 | unsigned long *length);
99 | XMLPUBFUN int XMLCALL
100 | xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
101 | xmlSchemaValType valType,
102 | const xmlChar *value,
103 | xmlSchemaValPtr val,
104 | unsigned long *length,
105 | xmlSchemaWhitespaceValueType ws);
106 | XMLPUBFUN int XMLCALL
107 | xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
108 | const xmlChar *value,
109 | xmlSchemaValPtr *val,
110 | xmlNodePtr node);
111 | XMLPUBFUN int XMLCALL
112 | xmlSchemaGetCanonValue (xmlSchemaValPtr val,
113 | const xmlChar **retValue);
114 | XMLPUBFUN int XMLCALL
115 | xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
116 | const xmlChar **retValue,
117 | xmlSchemaWhitespaceValueType ws);
118 | XMLPUBFUN int XMLCALL
119 | xmlSchemaValueAppend (xmlSchemaValPtr prev,
120 | xmlSchemaValPtr cur);
121 | XMLPUBFUN xmlSchemaValPtr XMLCALL
122 | xmlSchemaValueGetNext (xmlSchemaValPtr cur);
123 | XMLPUBFUN const xmlChar * XMLCALL
124 | xmlSchemaValueGetAsString (xmlSchemaValPtr val);
125 | XMLPUBFUN int XMLCALL
126 | xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
127 | XMLPUBFUN xmlSchemaValPtr XMLCALL
128 | xmlSchemaNewStringValue (xmlSchemaValType type,
129 | const xmlChar *value);
130 | XMLPUBFUN xmlSchemaValPtr XMLCALL
131 | xmlSchemaNewNOTATIONValue (const xmlChar *name,
132 | const xmlChar *ns);
133 | XMLPUBFUN xmlSchemaValPtr XMLCALL
134 | xmlSchemaNewQNameValue (const xmlChar *namespaceName,
135 | const xmlChar *localName);
136 | XMLPUBFUN int XMLCALL
137 | xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
138 | xmlSchemaWhitespaceValueType xws,
139 | xmlSchemaValPtr y,
140 | xmlSchemaWhitespaceValueType yws);
141 | XMLPUBFUN xmlSchemaValPtr XMLCALL
142 | xmlSchemaCopyValue (xmlSchemaValPtr val);
143 | XMLPUBFUN xmlSchemaValType XMLCALL
144 | xmlSchemaGetValType (xmlSchemaValPtr val);
145 |
146 | #ifdef __cplusplus
147 | }
148 | #endif
149 |
150 | #endif /* LIBXML_SCHEMAS_ENABLED */
151 | #endif /* __XML_SCHEMA_TYPES_H__ */
152 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xmlstring.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: set of routines to process strings
3 | * Description: type and interfaces needed for the internal string handling
4 | * of the library, especially UTF8 processing.
5 | *
6 | * Copy: See Copyright for the status of this software.
7 | *
8 | * Author: Daniel Veillard
9 | */
10 |
11 | #ifndef __XML_STRING_H__
12 | #define __XML_STRING_H__
13 |
14 | #include
15 | #include
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 |
21 | /**
22 | * xmlChar:
23 | *
24 | * This is a basic byte in an UTF-8 encoded string.
25 | * It's unsigned allowing to pinpoint case where char * are assigned
26 | * to xmlChar * (possibly making serialization back impossible).
27 | */
28 | typedef unsigned char xmlChar;
29 |
30 | /**
31 | * BAD_CAST:
32 | *
33 | * Macro to cast a string to an xmlChar * when one know its safe.
34 | */
35 | #define BAD_CAST (xmlChar *)
36 |
37 | /*
38 | * xmlChar handling
39 | */
40 | XMLPUBFUN xmlChar * XMLCALL
41 | xmlStrdup (const xmlChar *cur);
42 | XMLPUBFUN xmlChar * XMLCALL
43 | xmlStrndup (const xmlChar *cur,
44 | int len);
45 | XMLPUBFUN xmlChar * XMLCALL
46 | xmlCharStrndup (const char *cur,
47 | int len);
48 | XMLPUBFUN xmlChar * XMLCALL
49 | xmlCharStrdup (const char *cur);
50 | XMLPUBFUN xmlChar * XMLCALL
51 | xmlStrsub (const xmlChar *str,
52 | int start,
53 | int len);
54 | XMLPUBFUN const xmlChar * XMLCALL
55 | xmlStrchr (const xmlChar *str,
56 | xmlChar val);
57 | XMLPUBFUN const xmlChar * XMLCALL
58 | xmlStrstr (const xmlChar *str,
59 | const xmlChar *val);
60 | XMLPUBFUN const xmlChar * XMLCALL
61 | xmlStrcasestr (const xmlChar *str,
62 | const xmlChar *val);
63 | XMLPUBFUN int XMLCALL
64 | xmlStrcmp (const xmlChar *str1,
65 | const xmlChar *str2);
66 | XMLPUBFUN int XMLCALL
67 | xmlStrncmp (const xmlChar *str1,
68 | const xmlChar *str2,
69 | int len);
70 | XMLPUBFUN int XMLCALL
71 | xmlStrcasecmp (const xmlChar *str1,
72 | const xmlChar *str2);
73 | XMLPUBFUN int XMLCALL
74 | xmlStrncasecmp (const xmlChar *str1,
75 | const xmlChar *str2,
76 | int len);
77 | XMLPUBFUN int XMLCALL
78 | xmlStrEqual (const xmlChar *str1,
79 | const xmlChar *str2);
80 | XMLPUBFUN int XMLCALL
81 | xmlStrQEqual (const xmlChar *pref,
82 | const xmlChar *name,
83 | const xmlChar *str);
84 | XMLPUBFUN int XMLCALL
85 | xmlStrlen (const xmlChar *str);
86 | XMLPUBFUN xmlChar * XMLCALL
87 | xmlStrcat (xmlChar *cur,
88 | const xmlChar *add);
89 | XMLPUBFUN xmlChar * XMLCALL
90 | xmlStrncat (xmlChar *cur,
91 | const xmlChar *add,
92 | int len);
93 | XMLPUBFUN xmlChar * XMLCALL
94 | xmlStrncatNew (const xmlChar *str1,
95 | const xmlChar *str2,
96 | int len);
97 | XMLPUBFUN int XMLCALL
98 | xmlStrPrintf (xmlChar *buf,
99 | int len,
100 | const char *msg,
101 | ...) LIBXML_ATTR_FORMAT(3,4);
102 | XMLPUBFUN int XMLCALL
103 | xmlStrVPrintf (xmlChar *buf,
104 | int len,
105 | const char *msg,
106 | va_list ap) LIBXML_ATTR_FORMAT(3,0);
107 |
108 | XMLPUBFUN int XMLCALL
109 | xmlGetUTF8Char (const unsigned char *utf,
110 | int *len);
111 | XMLPUBFUN int XMLCALL
112 | xmlCheckUTF8 (const unsigned char *utf);
113 | XMLPUBFUN int XMLCALL
114 | xmlUTF8Strsize (const xmlChar *utf,
115 | int len);
116 | XMLPUBFUN xmlChar * XMLCALL
117 | xmlUTF8Strndup (const xmlChar *utf,
118 | int len);
119 | XMLPUBFUN const xmlChar * XMLCALL
120 | xmlUTF8Strpos (const xmlChar *utf,
121 | int pos);
122 | XMLPUBFUN int XMLCALL
123 | xmlUTF8Strloc (const xmlChar *utf,
124 | const xmlChar *utfchar);
125 | XMLPUBFUN xmlChar * XMLCALL
126 | xmlUTF8Strsub (const xmlChar *utf,
127 | int start,
128 | int len);
129 | XMLPUBFUN int XMLCALL
130 | xmlUTF8Strlen (const xmlChar *utf);
131 | XMLPUBFUN int XMLCALL
132 | xmlUTF8Size (const xmlChar *utf);
133 | XMLPUBFUN int XMLCALL
134 | xmlUTF8Charcmp (const xmlChar *utf1,
135 | const xmlChar *utf2);
136 |
137 | #ifdef __cplusplus
138 | }
139 | #endif
140 | #endif /* __XML_STRING_H__ */
141 |
--------------------------------------------------------------------------------
/vendor/libxml/include/libxml/xpointer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: API to handle XML Pointers
3 | * Description: API to handle XML Pointers
4 | * Base implementation was made accordingly to
5 | * W3C Candidate Recommendation 7 June 2000
6 | * http://www.w3.org/TR/2000/CR-xptr-20000607
7 | *
8 | * Added support for the element() scheme described in:
9 | * W3C Proposed Recommendation 13 November 2002
10 | * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
11 | *
12 | * Copy: See Copyright for the status of this software.
13 | *
14 | * Author: Daniel Veillard
15 | */
16 |
17 | #ifndef __XML_XPTR_H__
18 | #define __XML_XPTR_H__
19 |
20 | #include
21 |
22 | #ifdef LIBXML_XPTR_ENABLED
23 |
24 | #include
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /*
32 | * A Location Set
33 | */
34 | typedef struct _xmlLocationSet xmlLocationSet;
35 | typedef xmlLocationSet *xmlLocationSetPtr;
36 | struct _xmlLocationSet {
37 | int locNr; /* number of locations in the set */
38 | int locMax; /* size of the array as allocated */
39 | xmlXPathObjectPtr *locTab;/* array of locations */
40 | };
41 |
42 | /*
43 | * Handling of location sets.
44 | */
45 |
46 | XMLPUBFUN xmlLocationSetPtr XMLCALL
47 | xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
48 | XMLPUBFUN void XMLCALL
49 | xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
50 | XMLPUBFUN xmlLocationSetPtr XMLCALL
51 | xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
52 | xmlLocationSetPtr val2);
53 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
54 | xmlXPtrNewRange (xmlNodePtr start,
55 | int startindex,
56 | xmlNodePtr end,
57 | int endindex);
58 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
59 | xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
60 | xmlXPathObjectPtr end);
61 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
62 | xmlXPtrNewRangeNodePoint (xmlNodePtr start,
63 | xmlXPathObjectPtr end);
64 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
65 | xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
66 | xmlNodePtr end);
67 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
68 | xmlXPtrNewRangeNodes (xmlNodePtr start,
69 | xmlNodePtr end);
70 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
71 | xmlXPtrNewLocationSetNodes (xmlNodePtr start,
72 | xmlNodePtr end);
73 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
74 | xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
75 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
76 | xmlXPtrNewRangeNodeObject (xmlNodePtr start,
77 | xmlXPathObjectPtr end);
78 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
79 | xmlXPtrNewCollapsedRange (xmlNodePtr start);
80 | XMLPUBFUN void XMLCALL
81 | xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
82 | xmlXPathObjectPtr val);
83 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
84 | xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
85 | XMLPUBFUN void XMLCALL
86 | xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
87 | xmlXPathObjectPtr val);
88 | XMLPUBFUN void XMLCALL
89 | xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
90 | int val);
91 |
92 | /*
93 | * Functions.
94 | */
95 | XMLPUBFUN xmlXPathContextPtr XMLCALL
96 | xmlXPtrNewContext (xmlDocPtr doc,
97 | xmlNodePtr here,
98 | xmlNodePtr origin);
99 | XMLPUBFUN xmlXPathObjectPtr XMLCALL
100 | xmlXPtrEval (const xmlChar *str,
101 | xmlXPathContextPtr ctx);
102 | XMLPUBFUN void XMLCALL
103 | xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
104 | int nargs);
105 | XMLPUBFUN xmlNodePtr XMLCALL
106 | xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
107 | XMLPUBFUN void XMLCALL
108 | xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
109 | #ifdef __cplusplus
110 | }
111 | #endif
112 |
113 | #endif /* LIBXML_XPTR_ENABLED */
114 | #endif /* __XML_XPTR_H__ */
115 |
--------------------------------------------------------------------------------
/vendor/libxml/include/win32config.h:
--------------------------------------------------------------------------------
1 | #ifndef __LIBXML_WIN32_CONFIG__
2 | #define __LIBXML_WIN32_CONFIG__
3 |
4 | #define HAVE_CTYPE_H
5 | #define HAVE_STDARG_H
6 | #define HAVE_MALLOC_H
7 | #define HAVE_ERRNO_H
8 | #define SEND_ARG2_CAST
9 | #define GETHOSTBYNAME_ARG_CAST
10 |
11 | #if defined(_WIN32_WCE)
12 | #undef HAVE_ERRNO_H
13 | #include
14 | #include "wincecompat.h"
15 | #else
16 | #define HAVE_SYS_STAT_H
17 | #define HAVE__STAT
18 | #define HAVE_STAT
19 | #define HAVE_STDLIB_H
20 | #define HAVE_TIME_H
21 | #define HAVE_FCNTL_H
22 | #include
23 | #include
24 | #endif
25 |
26 | #include
27 |
28 | #ifndef ICONV_CONST
29 | #define ICONV_CONST const
30 | #endif
31 |
32 | #ifdef NEED_SOCKETS
33 | #include
34 | #endif
35 |
36 | /*
37 | * Windows platforms may define except
38 | */
39 | #undef except
40 |
41 | #define HAVE_ISINF
42 | #define HAVE_ISNAN
43 | #include
44 | #if defined(_MSC_VER) || defined(__BORLANDC__)
45 | /* MS C-runtime has functions which can be used in order to determine if
46 | a given floating-point variable contains NaN, (+-)INF. These are
47 | preferred, because floating-point technology is considered propriatary
48 | by MS and we can assume that their functions know more about their
49 | oddities than we do. */
50 | #include
51 | /* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
52 | function. */
53 | #ifndef isinf
54 | #define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
55 | : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
56 | #endif
57 | /* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
58 | #ifndef isnan
59 | #define isnan(d) (_isnan(d))
60 | #endif
61 | #else /* _MSC_VER */
62 | #ifndef isinf
63 | static int isinf (double d) {
64 | int expon = 0;
65 | double val = frexp (d, &expon);
66 | if (expon == 1025) {
67 | if (val == 0.5) {
68 | return 1;
69 | } else if (val == -0.5) {
70 | return -1;
71 | } else {
72 | return 0;
73 | }
74 | } else {
75 | return 0;
76 | }
77 | }
78 | #endif
79 | #ifndef isnan
80 | static int isnan (double d) {
81 | int expon = 0;
82 | double val = frexp (d, &expon);
83 | if (expon == 1025) {
84 | if (val == 0.5) {
85 | return 0;
86 | } else if (val == -0.5) {
87 | return 0;
88 | } else {
89 | return 1;
90 | }
91 | } else {
92 | return 0;
93 | }
94 | }
95 | #endif
96 | #endif /* _MSC_VER */
97 |
98 | #if defined(_MSC_VER)
99 | #define mkdir(p,m) _mkdir(p)
100 | #if _MSC_VER < 1900
101 | #define snprintf _snprintf
102 | #endif
103 | #if _MSC_VER < 1500
104 | #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
105 | #endif
106 | #elif defined(__MINGW32__)
107 | #define mkdir(p,m) _mkdir(p)
108 | #endif
109 |
110 | /* Threading API to use should be specified here for compatibility reasons.
111 | This is however best specified on the compiler's command-line. */
112 | #if defined(LIBXML_THREAD_ENABLED)
113 | #if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
114 | #define HAVE_WIN32_THREADS
115 | #endif
116 | #endif
117 |
118 | /* Some third-party libraries far from our control assume the following
119 | is defined, which it is not if we don't include windows.h. */
120 | #if !defined(FALSE)
121 | #define FALSE 0
122 | #endif
123 | #if !defined(TRUE)
124 | #define TRUE (!(FALSE))
125 | #endif
126 |
127 | #endif /* __LIBXML_WIN32_CONFIG__ */
128 |
129 |
--------------------------------------------------------------------------------
/vendor/libxml/include/wsockcompat.h:
--------------------------------------------------------------------------------
1 | /* include/wsockcompat.h
2 | * Windows -> Berkeley Sockets compatibility things.
3 | */
4 |
5 | #if !defined __XML_WSOCKCOMPAT_H__
6 | #define __XML_WSOCKCOMPAT_H__
7 |
8 | #ifdef _WIN32_WCE
9 | #include
10 | #else
11 | #undef HAVE_ERRNO_H
12 | #include
13 |
14 | /* the following is a workaround a problem for 'inline' keyword in said
15 | header when compiled with Borland C++ 6 */
16 | #if defined(__BORLANDC__) && !defined(__cplusplus)
17 | #define inline __inline
18 | #define _inline __inline
19 | #endif
20 |
21 | #include
22 |
23 | /* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
24 | #if defined(GetAddrInfo)
25 | #include
26 | #define HAVE_GETADDRINFO
27 | #endif
28 | #endif
29 |
30 | #if defined( __MINGW32__ ) || defined( _MSC_VER )
31 | /* Include here to ensure that it doesn't get included later
32 | * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
33 | #include
34 | #undef EWOULDBLOCK
35 | #endif
36 |
37 | #if !defined SOCKLEN_T
38 | #define SOCKLEN_T int
39 | #endif
40 |
41 | #define EWOULDBLOCK WSAEWOULDBLOCK
42 | #define ESHUTDOWN WSAESHUTDOWN
43 |
44 | #if (!defined(_MSC_VER) || (_MSC_VER < 1600))
45 | #define EINPROGRESS WSAEINPROGRESS
46 | #define EALREADY WSAEALREADY
47 | #define ENOTSOCK WSAENOTSOCK
48 | #define EDESTADDRREQ WSAEDESTADDRREQ
49 | #define EMSGSIZE WSAEMSGSIZE
50 | #define EPROTOTYPE WSAEPROTOTYPE
51 | #define ENOPROTOOPT WSAENOPROTOOPT
52 | #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
53 | #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
54 | #define EOPNOTSUPP WSAEOPNOTSUPP
55 | #define EPFNOSUPPORT WSAEPFNOSUPPORT
56 | #define EAFNOSUPPORT WSAEAFNOSUPPORT
57 | #define EADDRINUSE WSAEADDRINUSE
58 | #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
59 | #define ENETDOWN WSAENETDOWN
60 | #define ENETUNREACH WSAENETUNREACH
61 | #define ENETRESET WSAENETRESET
62 | #define ECONNABORTED WSAECONNABORTED
63 | #define ECONNRESET WSAECONNRESET
64 | #define ENOBUFS WSAENOBUFS
65 | #define EISCONN WSAEISCONN
66 | #define ENOTCONN WSAENOTCONN
67 | #define ETOOMANYREFS WSAETOOMANYREFS
68 | #define ETIMEDOUT WSAETIMEDOUT
69 | #define ECONNREFUSED WSAECONNREFUSED
70 | #define ELOOP WSAELOOP
71 | #define EHOSTDOWN WSAEHOSTDOWN
72 | #define EHOSTUNREACH WSAEHOSTUNREACH
73 | #define EPROCLIM WSAEPROCLIM
74 | #define EUSERS WSAEUSERS
75 | #define EDQUOT WSAEDQUOT
76 | #define ESTALE WSAESTALE
77 | #define EREMOTE WSAEREMOTE
78 | /* These cause conflicts with the codes from errno.h. Since they are
79 | not used in the relevant code (nanoftp, napi.http), we can leave
80 | them disabled.
81 | #define ENAMETOOLONG WSAENAMETOOLONG
82 | #define ENOTEMPTY WSAENOTEMPTY
83 | */
84 | #endif /* _MSC_VER */
85 |
86 | #endif /* __XML_WSOCKCOMPAT_H__ */
87 |
--------------------------------------------------------------------------------
/vendor/libxml/libxml.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libxml.h: internal header only used during the compilation of libxml
3 | *
4 | * See COPYRIGHT for the status of this software
5 | *
6 | * Author: breese@users.sourceforge.net
7 | */
8 |
9 | #ifndef __XML_LIBXML_H__
10 | #define __XML_LIBXML_H__
11 |
12 | #include
13 |
14 | #ifndef NO_LARGEFILE_SOURCE
15 | #ifndef _LARGEFILE_SOURCE
16 | #define _LARGEFILE_SOURCE
17 | #endif
18 | #ifndef _FILE_OFFSET_BITS
19 | #define _FILE_OFFSET_BITS 64
20 | #endif
21 | #endif
22 |
23 | #if defined(macintosh)
24 | #include "config-mac.h"
25 | #elif defined(_WIN32_WCE)
26 | /*
27 | * Windows CE compatibility definitions and functions
28 | * This is needed to compile libxml2 for Windows CE.
29 | * At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2/SH4 target
30 | */
31 | #include
32 | #include
33 | #else
34 | /*
35 | * Currently supported platforms use either autoconf or
36 | * copy to config.h own "preset" configuration file.
37 | * As result ifdef HAVE_CONFIG_H is omited here.
38 | */
39 | #include "config.h"
40 | #include
41 | #endif
42 |
43 | #if defined(__Lynx__)
44 | #include /* pull definition of size_t */
45 | #include
46 | int snprintf(char *, size_t, const char *, ...);
47 | int vfprintf(FILE *, const char *, va_list);
48 | #endif
49 |
50 | #ifndef WITH_TRIO
51 | #include
52 | #else
53 | /**
54 | * TRIO_REPLACE_STDIO:
55 | *
56 | * This macro is defined if teh trio string formatting functions are to
57 | * be used instead of the default stdio ones.
58 | */
59 | #define TRIO_REPLACE_STDIO
60 | #include "trio.h"
61 | #endif
62 |
63 | /*
64 | * Internal variable indicating if a callback has been registered for
65 | * node creation/destruction. It avoids spending a lot of time in locking
66 | * function while checking if the callback exists.
67 | */
68 | extern int __xmlRegisterCallbacks;
69 | /*
70 | * internal error reporting routines, shared but not partof the API.
71 | */
72 | void __xmlIOErr(int domain, int code, const char *extra);
73 | void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
74 | #ifdef LIBXML_HTML_ENABLED
75 | /*
76 | * internal function of HTML parser needed for xmlParseInNodeContext
77 | * but not part of the API
78 | */
79 | void __htmlParseContent(void *ctx);
80 | #endif
81 |
82 | /*
83 | * internal global initialization critical section routines.
84 | */
85 | void __xmlGlobalInitMutexLock(void);
86 | void __xmlGlobalInitMutexUnlock(void);
87 | void __xmlGlobalInitMutexDestroy(void);
88 |
89 | int __xmlInitializeDict(void);
90 |
91 | #if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
92 | /*
93 | * internal thread safe random function
94 | */
95 | int __xmlRandom(void);
96 | #endif
97 |
98 | XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
99 | int xmlNop(void);
100 |
101 | #ifdef IN_LIBXML
102 | #ifdef __GNUC__
103 | #ifdef PIC
104 | #ifdef linux
105 | #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
106 | #include "elfgcchack.h"
107 | #endif
108 | #endif
109 | #endif
110 | #endif
111 | #endif
112 | #if !defined(PIC) && !defined(NOLIBTOOL)
113 | # define LIBXML_STATIC
114 | #endif
115 | #endif /* ! __XML_LIBXML_H__ */
116 |
--------------------------------------------------------------------------------
/vendor/libxml/save.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Summary: Internal Interfaces for saving in libxml2
3 | * Description: this module describes a few interfaces which were
4 | * addded along with the API changes in 2.9.0
5 | * those are private routines at this point
6 | *
7 | * Copy: See Copyright for the status of this software.
8 | *
9 | * Author: Daniel Veillard
10 | */
11 |
12 | #ifndef __XML_SAVE_H__
13 | #define __XML_SAVE_H__
14 |
15 | #include
16 |
17 | #ifdef __cplusplus
18 | extern "C" {
19 | #endif
20 |
21 | #ifdef LIBXML_OUTPUT_ENABLED
22 | void xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
23 | xmlAttrPtr attr, const xmlChar * string);
24 | void xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table);
25 | void xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem);
26 | void xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr);
27 | void xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent);
28 | xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
29 | #endif
30 |
31 | #ifdef __cplusplus
32 | }
33 | #endif
34 | #endif /* __XML_SAVE_H__ */
35 |
36 |
--------------------------------------------------------------------------------
/vendor/libxml/trionan.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | *
3 | * $Id$
4 | *
5 | * Copyright (C) 2001 Bjorn Reese
6 | *
7 | * Permission to use, copy, modify, and distribute this software for any
8 | * purpose with or without fee is hereby granted, provided that the above
9 | * copyright notice and this permission notice appear in all copies.
10 | *
11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15 | *
16 | ************************************************************************/
17 |
18 | #ifndef TRIO_NAN_H
19 | #define TRIO_NAN_H
20 |
21 | #include "triodef.h"
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | enum {
28 | TRIO_FP_INFINITE,
29 | TRIO_FP_NAN,
30 | TRIO_FP_NORMAL,
31 | TRIO_FP_SUBNORMAL,
32 | TRIO_FP_ZERO
33 | };
34 |
35 | /*
36 | * Return NaN (Not-a-Number).
37 | */
38 | TRIO_PUBLIC double trio_nan TRIO_PROTO((void));
39 |
40 | /*
41 | * Return positive infinity.
42 | */
43 | TRIO_PUBLIC double trio_pinf TRIO_PROTO((void));
44 |
45 | /*
46 | * Return negative infinity.
47 | */
48 | TRIO_PUBLIC double trio_ninf TRIO_PROTO((void));
49 |
50 | /*
51 | * Return negative zero.
52 | */
53 | TRIO_PUBLIC double trio_nzero TRIO_PROTO((TRIO_NOARGS));
54 |
55 | /*
56 | * If number is a NaN return non-zero, otherwise return zero.
57 | */
58 | TRIO_PUBLIC int trio_isnan TRIO_PROTO((double number));
59 |
60 | /*
61 | * If number is positive infinity return 1, if number is negative
62 | * infinity return -1, otherwise return 0.
63 | */
64 | TRIO_PUBLIC int trio_isinf TRIO_PROTO((double number));
65 |
66 | /*
67 | * If number is finite return non-zero, otherwise return zero.
68 | */
69 | #if 0
70 | /* Temporary fix - these 2 routines not used in libxml */
71 | TRIO_PUBLIC int trio_isfinite TRIO_PROTO((double number));
72 |
73 | TRIO_PUBLIC int trio_fpclassify TRIO_PROTO((double number));
74 | #endif
75 |
76 | TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number));
77 |
78 | TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO((double number, int *is_negative));
79 |
80 | #ifdef __cplusplus
81 | }
82 | #endif
83 |
84 | #endif /* TRIO_NAN_H */
85 |
--------------------------------------------------------------------------------
/vendor/libxml/triop.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | *
3 | * $Id$
4 | *
5 | * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
6 | *
7 | * Permission to use, copy, modify, and distribute this software for any
8 | * purpose with or without fee is hereby granted, provided that the above
9 | * copyright notice and this permission notice appear in all copies.
10 | *
11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15 | *
16 | ************************************************************************
17 | *
18 | * Private functions, types, etc. used for callback functions.
19 | *
20 | * The ref pointer is an opaque type and should remain as such.
21 | * Private data must only be accessible through the getter and
22 | * setter functions.
23 | *
24 | ************************************************************************/
25 |
26 | #ifndef TRIO_TRIOP_H
27 | #define TRIO_TRIOP_H
28 |
29 | #include "triodef.h"
30 |
31 | #include
32 | #if defined(TRIO_COMPILER_ANCIENT)
33 | # include
34 | #else
35 | # include
36 | #endif
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | #ifndef TRIO_C99
43 | # define TRIO_C99 1
44 | #endif
45 | #ifndef TRIO_BSD
46 | # define TRIO_BSD 1
47 | #endif
48 | #ifndef TRIO_GNU
49 | # define TRIO_GNU 1
50 | #endif
51 | #ifndef TRIO_MISC
52 | # define TRIO_MISC 1
53 | #endif
54 | #ifndef TRIO_UNIX98
55 | # define TRIO_UNIX98 1
56 | #endif
57 | #ifndef TRIO_MICROSOFT
58 | # define TRIO_MICROSOFT 1
59 | #endif
60 | #ifndef TRIO_EXTENSION
61 | # define TRIO_EXTENSION 1
62 | #endif
63 | #ifndef TRIO_WIDECHAR /* Does not work yet. Do not enable */
64 | # define TRIO_WIDECHAR 0
65 | #endif
66 | #ifndef TRIO_ERRORS
67 | # define TRIO_ERRORS 1
68 | #endif
69 |
70 | #ifndef TRIO_MALLOC
71 | # define TRIO_MALLOC(n) malloc(n)
72 | #endif
73 | #ifndef TRIO_REALLOC
74 | # define TRIO_REALLOC(x,n) realloc((x),(n))
75 | #endif
76 | #ifndef TRIO_FREE
77 | # define TRIO_FREE(x) free(x)
78 | #endif
79 |
80 |
81 | /*************************************************************************
82 | * User-defined specifiers
83 | */
84 |
85 | typedef int (*trio_callback_t) TRIO_PROTO((trio_pointer_t));
86 |
87 | trio_pointer_t trio_register TRIO_PROTO((trio_callback_t callback, const char *name));
88 | void trio_unregister TRIO_PROTO((trio_pointer_t handle));
89 |
90 | TRIO_CONST char *trio_get_format TRIO_PROTO((trio_pointer_t ref));
91 | trio_pointer_t trio_get_argument TRIO_PROTO((trio_pointer_t ref));
92 |
93 | /* Modifiers */
94 | int trio_get_width TRIO_PROTO((trio_pointer_t ref));
95 | void trio_set_width TRIO_PROTO((trio_pointer_t ref, int width));
96 | int trio_get_precision TRIO_PROTO((trio_pointer_t ref));
97 | void trio_set_precision TRIO_PROTO((trio_pointer_t ref, int precision));
98 | int trio_get_base TRIO_PROTO((trio_pointer_t ref));
99 | void trio_set_base TRIO_PROTO((trio_pointer_t ref, int base));
100 | int trio_get_padding TRIO_PROTO((trio_pointer_t ref));
101 | void trio_set_padding TRIO_PROTO((trio_pointer_t ref, int is_padding));
102 | int trio_get_short TRIO_PROTO((trio_pointer_t ref)); /* h */
103 | void trio_set_shortshort TRIO_PROTO((trio_pointer_t ref, int is_shortshort));
104 | int trio_get_shortshort TRIO_PROTO((trio_pointer_t ref)); /* hh */
105 | void trio_set_short TRIO_PROTO((trio_pointer_t ref, int is_short));
106 | int trio_get_long TRIO_PROTO((trio_pointer_t ref)); /* l */
107 | void trio_set_long TRIO_PROTO((trio_pointer_t ref, int is_long));
108 | int trio_get_longlong TRIO_PROTO((trio_pointer_t ref)); /* ll */
109 | void trio_set_longlong TRIO_PROTO((trio_pointer_t ref, int is_longlong));
110 | int trio_get_longdouble TRIO_PROTO((trio_pointer_t ref)); /* L */
111 | void trio_set_longdouble TRIO_PROTO((trio_pointer_t ref, int is_longdouble));
112 | int trio_get_alternative TRIO_PROTO((trio_pointer_t ref)); /* # */
113 | void trio_set_alternative TRIO_PROTO((trio_pointer_t ref, int is_alternative));
114 | int trio_get_alignment TRIO_PROTO((trio_pointer_t ref)); /* - */
115 | void trio_set_alignment TRIO_PROTO((trio_pointer_t ref, int is_leftaligned));
116 | int trio_get_spacing TRIO_PROTO((trio_pointer_t ref)); /* TRIO_PROTO((space) */
117 | void trio_set_spacing TRIO_PROTO((trio_pointer_t ref, int is_space));
118 | int trio_get_sign TRIO_PROTO((trio_pointer_t ref)); /* + */
119 | void trio_set_sign TRIO_PROTO((trio_pointer_t ref, int is_showsign));
120 | int trio_get_quote TRIO_PROTO((trio_pointer_t ref)); /* ' */
121 | void trio_set_quote TRIO_PROTO((trio_pointer_t ref, int is_quote));
122 | int trio_get_upper TRIO_PROTO((trio_pointer_t ref));
123 | void trio_set_upper TRIO_PROTO((trio_pointer_t ref, int is_upper));
124 | #if TRIO_C99
125 | int trio_get_largest TRIO_PROTO((trio_pointer_t ref)); /* j */
126 | void trio_set_largest TRIO_PROTO((trio_pointer_t ref, int is_largest));
127 | int trio_get_ptrdiff TRIO_PROTO((trio_pointer_t ref)); /* t */
128 | void trio_set_ptrdiff TRIO_PROTO((trio_pointer_t ref, int is_ptrdiff));
129 | int trio_get_size TRIO_PROTO((trio_pointer_t ref)); /* z / Z */
130 | void trio_set_size TRIO_PROTO((trio_pointer_t ref, int is_size));
131 | #endif
132 |
133 | /* Printing */
134 | int trio_print_ref TRIO_PROTO((trio_pointer_t ref, const char *format, ...));
135 | int trio_vprint_ref TRIO_PROTO((trio_pointer_t ref, const char *format, va_list args));
136 | int trio_printv_ref TRIO_PROTO((trio_pointer_t ref, const char *format, trio_pointer_t *args));
137 |
138 | void trio_print_int TRIO_PROTO((trio_pointer_t ref, int number));
139 | void trio_print_uint TRIO_PROTO((trio_pointer_t ref, unsigned int number));
140 | /* void trio_print_long TRIO_PROTO((trio_pointer_t ref, long number)); */
141 | /* void trio_print_ulong TRIO_PROTO((trio_pointer_t ref, unsigned long number)); */
142 | void trio_print_double TRIO_PROTO((trio_pointer_t ref, double number));
143 | void trio_print_string TRIO_PROTO((trio_pointer_t ref, char *string));
144 | void trio_print_pointer TRIO_PROTO((trio_pointer_t ref, trio_pointer_t pointer));
145 |
146 | #ifdef __cplusplus
147 | } /* extern "C" */
148 | #endif
149 |
150 | #endif /* TRIO_TRIOP_H */
151 |
--------------------------------------------------------------------------------
/vendor/libxml/xlink.c:
--------------------------------------------------------------------------------
1 | /*
2 | * xlink.c : implementation of the hyperlinks detection module
3 | * This version supports both XML XLinks and HTML simple links
4 | *
5 | * See Copyright for the status of this software.
6 | *
7 | * daniel@veillard.com
8 | */
9 |
10 |
11 | #define IN_LIBXML
12 | #include "libxml.h"
13 |
14 | #ifdef LIBXML_XPTR_ENABLED
15 | #include /* for memset() only */
16 | #ifdef HAVE_CTYPE_H
17 | #include
18 | #endif
19 | #ifdef HAVE_STDLIB_H
20 | #include
21 | #endif
22 | #ifdef HAVE_SYS_STAT_H
23 | #include
24 | #endif
25 | #ifdef HAVE_FCNTL_H
26 | #include
27 | #endif
28 | #ifdef HAVE_UNISTD_H
29 | #include
30 | #endif
31 | #ifdef HAVE_ZLIB_H
32 | #include
33 | #endif
34 |
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 |
42 | #define XLINK_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xlink/namespace/")
43 | #define XHTML_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xhtml/")
44 |
45 | /****************************************************************
46 | * *
47 | * Default setting and related functions *
48 | * *
49 | ****************************************************************/
50 |
51 | static xlinkHandlerPtr xlinkDefaultHandler = NULL;
52 | static xlinkNodeDetectFunc xlinkDefaultDetect = NULL;
53 |
54 | /**
55 | * xlinkGetDefaultHandler:
56 | *
57 | * Get the default xlink handler.
58 | *
59 | * Returns the current xlinkHandlerPtr value.
60 | */
61 | xlinkHandlerPtr
62 | xlinkGetDefaultHandler(void) {
63 | return(xlinkDefaultHandler);
64 | }
65 |
66 |
67 | /**
68 | * xlinkSetDefaultHandler:
69 | * @handler: the new value for the xlink handler block
70 | *
71 | * Set the default xlink handlers
72 | */
73 | void
74 | xlinkSetDefaultHandler(xlinkHandlerPtr handler) {
75 | xlinkDefaultHandler = handler;
76 | }
77 |
78 | /**
79 | * xlinkGetDefaultDetect:
80 | *
81 | * Get the default xlink detection routine
82 | *
83 | * Returns the current function or NULL;
84 | */
85 | xlinkNodeDetectFunc
86 | xlinkGetDefaultDetect (void) {
87 | return(xlinkDefaultDetect);
88 | }
89 |
90 | /**
91 | * xlinkSetDefaultDetect:
92 | * @func: pointer to the new detection routine.
93 | *
94 | * Set the default xlink detection routine
95 | */
96 | void
97 | xlinkSetDefaultDetect (xlinkNodeDetectFunc func) {
98 | xlinkDefaultDetect = func;
99 | }
100 |
101 | /****************************************************************
102 | * *
103 | * The detection routines *
104 | * *
105 | ****************************************************************/
106 |
107 |
108 | /**
109 | * xlinkIsLink:
110 | * @doc: the document containing the node
111 | * @node: the node pointer itself
112 | *
113 | * Check whether the given node carries the attributes needed
114 | * to be a link element (or is one of the linking elements issued
115 | * from the (X)HTML DtDs).
116 | * This routine don't try to do full checking of the link validity
117 | * but tries to detect and return the appropriate link type.
118 | *
119 | * Returns the xlinkType of the node (XLINK_TYPE_NONE if there is no
120 | * link detected.
121 | */
122 | xlinkType
123 | xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
124 | xmlChar *type = NULL, *role = NULL;
125 | xlinkType ret = XLINK_TYPE_NONE;
126 |
127 | if (node == NULL) return(XLINK_TYPE_NONE);
128 | if (doc == NULL) doc = node->doc;
129 | if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
130 | /*
131 | * This is an HTML document.
132 | */
133 | } else if ((node->ns != NULL) &&
134 | (xmlStrEqual(node->ns->href, XHTML_NAMESPACE))) {
135 | /*
136 | * !!!! We really need an IS_XHTML_ELEMENT function from HTMLtree.h @@@
137 | */
138 | /*
139 | * This is an XHTML element within an XML document
140 | * Check whether it's one of the element able to carry links
141 | * and in that case if it holds the attributes.
142 | */
143 | }
144 |
145 | /*
146 | * We don't prevent a-priori having XML Linking constructs on
147 | * XHTML elements
148 | */
149 | type = xmlGetNsProp(node, BAD_CAST"type", XLINK_NAMESPACE);
150 | if (type != NULL) {
151 | if (xmlStrEqual(type, BAD_CAST "simple")) {
152 | ret = XLINK_TYPE_SIMPLE;
153 | } else if (xmlStrEqual(type, BAD_CAST "extended")) {
154 | role = xmlGetNsProp(node, BAD_CAST "role", XLINK_NAMESPACE);
155 | if (role != NULL) {
156 | xmlNsPtr xlink;
157 | xlink = xmlSearchNs(doc, node, XLINK_NAMESPACE);
158 | if (xlink == NULL) {
159 | /* Humm, fallback method */
160 | if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
161 | ret = XLINK_TYPE_EXTENDED_SET;
162 | } else {
163 | xmlChar buf[200];
164 | snprintf((char *) buf, sizeof(buf), "%s:external-linkset",
165 | (char *) xlink->prefix);
166 | buf[sizeof(buf) - 1] = 0;
167 | if (xmlStrEqual(role, buf))
168 | ret = XLINK_TYPE_EXTENDED_SET;
169 |
170 | }
171 |
172 | }
173 | ret = XLINK_TYPE_EXTENDED;
174 | }
175 | }
176 |
177 | if (type != NULL) xmlFree(type);
178 | if (role != NULL) xmlFree(role);
179 | return(ret);
180 | }
181 | #endif /* LIBXML_XPTR_ENABLED */
182 | #define bottom_xlink
183 | #include "elfgcchack.h"
184 |
--------------------------------------------------------------------------------
/vendor/libxml/xzlib.h:
--------------------------------------------------------------------------------
1 | /**
2 | * xzlib.h: header for the front end for the transparent suport of lzma
3 | * compression at the I/O layer
4 | *
5 | * See Copyright for the status of this software.
6 | *
7 | * Anders F Bjorklund
8 | */
9 |
10 | #ifndef LIBXML2_XZLIB_H
11 | #define LIBXML2_XZLIB_H
12 | typedef void *xzFile; /* opaque lzma file descriptor */
13 |
14 | xzFile __libxml2_xzopen(const char *path, const char *mode);
15 | xzFile __libxml2_xzdopen(int fd, const char *mode);
16 | int __libxml2_xzread(xzFile file, void *buf, unsigned len);
17 | int __libxml2_xzclose(xzFile file);
18 | int __libxml2_xzcompressed(xzFile f);
19 | #endif /* LIBXML2_XZLIB_H */
20 |
--------------------------------------------------------------------------------