content_server 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/backup_server +8 -20
- data/bin/content_server +8 -20
- data/bin/testing_memory +60 -0
- data/bin/testing_server +57 -0
- data/ext/run_in_background/mkrf_conf.rb +34 -0
- data/lib/content_data/content_data.rb +613 -0
- data/lib/content_data/version.rb +3 -0
- data/lib/content_data.rb +6 -0
- data/lib/content_server/backup_server.rb +65 -86
- data/lib/content_server/content_server.rb +47 -77
- data/lib/content_server/file_streamer.rb +27 -33
- data/lib/content_server/queue_copy.rb +154 -49
- data/lib/content_server/queue_indexer.rb +19 -11
- data/lib/content_server/remote_content.rb +41 -23
- data/lib/content_server/server.rb +91 -0
- data/lib/content_server/version.rb +1 -1
- data/lib/content_server.rb +0 -15
- data/lib/email/email.rb +87 -0
- data/lib/email/version.rb +3 -0
- data/lib/email.rb +4 -0
- data/lib/file_copy/copy.rb +68 -0
- data/lib/file_copy/version.rb +4 -0
- data/lib/file_copy.rb +4 -0
- data/lib/file_indexing/index_agent.rb +170 -0
- data/lib/file_indexing/indexer_patterns.rb +72 -0
- data/lib/file_indexing/version.rb +3 -0
- data/lib/file_indexing.rb +9 -0
- data/lib/file_monitoring/file_monitoring.rb +105 -0
- data/lib/file_monitoring/monitor_path.rb +304 -0
- data/lib/file_monitoring/version.rb +3 -0
- data/lib/file_monitoring.rb +29 -0
- data/lib/file_utils/file_generator/README +97 -0
- data/lib/file_utils/file_generator/file_generator.rb +156 -0
- data/lib/file_utils/file_utils.rb +260 -0
- data/lib/file_utils/version.rb +3 -0
- data/lib/file_utils.rb +4 -0
- data/lib/log/version.rb +3 -0
- data/lib/log.rb +188 -0
- data/lib/networking/tcp.rb +213 -0
- data/lib/networking/version.rb +3 -0
- data/lib/networking.rb +4 -0
- data/lib/params/version.rb +3 -0
- data/lib/params.rb +419 -0
- data/lib/process_monitoring/monitoring.rb +85 -0
- data/lib/process_monitoring/monitoring_info.rb +79 -0
- data/lib/process_monitoring/send_email.rb +40 -0
- data/lib/process_monitoring/thread_safe_hash.rb +77 -0
- data/lib/process_monitoring/version.rb +3 -0
- data/lib/process_monitoring.rb +6 -0
- data/lib/run_in_background/version.rb +3 -0
- data/lib/run_in_background.rb +432 -0
- data/lib/testing_memory/testing_memory.rb +187 -0
- data/lib/testing_server/testing_server.rb +236 -0
- data/lib/testing_server/version.rb +3 -0
- data/lib/testing_server.rb +12 -0
- data/lib/validations/index_validations.rb +106 -0
- data/lib/validations/version.rb +3 -0
- data/lib/validations.rb +4 -0
- data/spec/content_data/validations_spec.rb +113 -0
- data/spec/file_copy/copy_spec.rb +54 -0
- data/spec/file_indexing/index_agent_spec.rb +53 -0
- data/spec/networking/tcp_spec.rb +95 -0
- data/spec/validations/index_validations_spec.rb +77 -0
- data/test/content_data/content_data_test.rb +290 -0
- data/test/file_generator/file_generator_spec.rb +84 -0
- data/test/file_indexing/index_agent_test/New.txt +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/libexslt.dll +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/libxslt.dll +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/xsltproc.exe +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exslt.h +102 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exsltconfig.h +73 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exsltexports.h +140 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/libexslt.h +29 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/attributes.h +38 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/documents.h +93 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/extensions.h +262 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/extra.h +80 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/functions.h +78 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/imports.h +75 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/keys.h +53 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/libxslt.h +30 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/namespaces.h +68 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/numbersInternals.h +69 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/pattern.h +81 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/preproc.h +43 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/security.h +104 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/templates.h +77 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/transform.h +207 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/trio.h +216 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/triodef.h +220 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/variables.h +91 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/win32config.h +101 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xslt.h +103 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltInternals.h +1967 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltconfig.h +172 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltexports.h +142 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltlocale.h +57 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltutils.h +309 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltwin32config.h +105 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libexslt.lib +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libexslt_a.lib +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libxslt.lib +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libxslt_a.lib +0 -0
- data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/readme.txt +22 -0
- data/test/file_indexing/index_agent_test/patterns.input +3 -0
- data/test/file_indexing/index_agent_test.rb +51 -0
- data/test/file_monitoring/file_monitoring_test/conf.yml +4 -0
- data/test/file_monitoring/file_monitoring_test/conf_win32.yml +5 -0
- data/test/file_monitoring/file_monitoring_test/log +56 -0
- data/test/file_monitoring/file_monitoring_test.rb +0 -0
- data/test/file_monitoring/monitor_path_test/dir1000/test_file.1000 +1000 -0
- data/test/file_monitoring/monitor_path_test/dir1000/test_file.1000.0 +1000 -0
- data/test/file_monitoring/monitor_path_test/dir1000/test_file.1000.1 +1000 -0
- data/test/file_monitoring/monitor_path_test/dir1500/test_file.1500 +1500 -0
- data/test/file_monitoring/monitor_path_test/dir1500/test_file.1500.0 +1500 -0
- data/test/file_monitoring/monitor_path_test/dir1500/test_file.1500.1 +1500 -0
- data/test/file_monitoring/monitor_path_test/test_file.500 +500 -0
- data/test/file_monitoring/monitor_path_test/test_file.500.0 +500 -0
- data/test/file_monitoring/monitor_path_test/test_file.500.1 +500 -0
- data/test/file_monitoring/monitor_path_test.rb +153 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/dir1500/test_file.1500 +1500 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/dir1500/test_file.1500.0 +1500 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/dir1500/test_file.1500.1 +1500 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/test_file.1000 +1000 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/test_file.1000.0 +1000 -0
- data/test/file_utils/fileutil_mksymlink_test/dir1000/test_file.1000.1 +1000 -0
- data/test/file_utils/fileutil_mksymlink_test/test_file.500 +500 -0
- data/test/file_utils/fileutil_mksymlink_test/test_file.500.0 +500 -0
- data/test/file_utils/fileutil_mksymlink_test/test_file.500.1 +500 -0
- data/test/file_utils/fileutil_mksymlink_test.rb +125 -0
- data/test/file_utils/time_modification_test.rb +132 -0
- data/test/params/params_spec.rb +280 -0
- data/test/params/params_test.rb +43 -0
- data/test/run_in_background/run_in_background_test.rb +122 -0
- data/test/run_in_background/test_app +57 -0
- metadata +272 -132
- data/lib/content_server/globals.rb +0 -10
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Summary: compile-time version informations for the XSLT engine
|
|
3
|
+
* Description: compile-time version informations for the XSLT engine
|
|
4
|
+
* this module is autogenerated.
|
|
5
|
+
*
|
|
6
|
+
* Copy: See Copyright for the status of this software.
|
|
7
|
+
*
|
|
8
|
+
* Author: Daniel Veillard
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#ifndef __XML_XSLTCONFIG_H__
|
|
12
|
+
#define __XML_XSLTCONFIG_H__
|
|
13
|
+
|
|
14
|
+
#ifdef __cplusplus
|
|
15
|
+
extern "C" {
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* LIBXSLT_DOTTED_VERSION:
|
|
20
|
+
*
|
|
21
|
+
* the version string like "1.2.3"
|
|
22
|
+
*/
|
|
23
|
+
#define LIBXSLT_DOTTED_VERSION "1.1.26"
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* LIBXSLT_VERSION:
|
|
27
|
+
*
|
|
28
|
+
* the version number: 1.2.3 value is 10203
|
|
29
|
+
*/
|
|
30
|
+
#define LIBXSLT_VERSION 10126
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* LIBXSLT_VERSION_STRING:
|
|
34
|
+
*
|
|
35
|
+
* the version number string, 1.2.3 value is "10203"
|
|
36
|
+
*/
|
|
37
|
+
#define LIBXSLT_VERSION_STRING "10126"
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* LIBXSLT_VERSION_EXTRA:
|
|
41
|
+
*
|
|
42
|
+
* extra version information, used to show a CVS compilation
|
|
43
|
+
*/
|
|
44
|
+
#define LIBXSLT_VERSION_EXTRA ""
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* WITH_XSLT_DEBUG:
|
|
48
|
+
*
|
|
49
|
+
* Activate the compilation of the debug reporting. Speed penalty
|
|
50
|
+
* is insignifiant and being able to run xsltpoc -v is useful. On
|
|
51
|
+
* by default unless --without-debug is passed to configure
|
|
52
|
+
*/
|
|
53
|
+
#if 1
|
|
54
|
+
#define WITH_XSLT_DEBUG
|
|
55
|
+
#endif
|
|
56
|
+
|
|
57
|
+
#if 0
|
|
58
|
+
/**
|
|
59
|
+
* DEBUG_MEMORY:
|
|
60
|
+
*
|
|
61
|
+
* should be activated only when debugging libxslt. It replaces the
|
|
62
|
+
* allocator with a collect and debug shell to the libc allocator.
|
|
63
|
+
* Use configure --with-mem-debug to activate it on both library
|
|
64
|
+
*/
|
|
65
|
+
#define DEBUG_MEMORY
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* DEBUG_MEMORY_LOCATION:
|
|
69
|
+
*
|
|
70
|
+
* should be activated only when debugging libxslt.
|
|
71
|
+
* DEBUG_MEMORY_LOCATION should be activated only when libxml has
|
|
72
|
+
* been configured with --with-debug-mem too
|
|
73
|
+
*/
|
|
74
|
+
#define DEBUG_MEMORY_LOCATION
|
|
75
|
+
#endif
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* XSLT_NEED_TRIO:
|
|
79
|
+
*
|
|
80
|
+
* should be activated if the existing libc library lacks some of the
|
|
81
|
+
* string formatting function, in that case reuse the Trio ones already
|
|
82
|
+
* compiled in the libxml2 library.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
#if 0
|
|
86
|
+
#define XSLT_NEED_TRIO
|
|
87
|
+
#endif
|
|
88
|
+
#ifdef __VMS
|
|
89
|
+
#define HAVE_MATH_H 1
|
|
90
|
+
#define HAVE_SYS_STAT_H 1
|
|
91
|
+
#ifndef XSLT_NEED_TRIO
|
|
92
|
+
#define XSLT_NEED_TRIO
|
|
93
|
+
#endif
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
#ifdef XSLT_NEED_TRIO
|
|
97
|
+
#define TRIO_REPLACE_STDIO
|
|
98
|
+
#endif
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* WITH_XSLT_DEBUGGER:
|
|
102
|
+
*
|
|
103
|
+
* Activate the compilation of the debugger support. Speed penalty
|
|
104
|
+
* is insignifiant.
|
|
105
|
+
* On by default unless --without-debugger is passed to configure
|
|
106
|
+
*/
|
|
107
|
+
#if 1
|
|
108
|
+
#ifndef WITH_DEBUGGER
|
|
109
|
+
#define WITH_DEBUGGER
|
|
110
|
+
#endif
|
|
111
|
+
#endif
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* WITH_MODULES:
|
|
115
|
+
*
|
|
116
|
+
* Whether module support is configured into libxslt
|
|
117
|
+
* Note: no default module path for win32 platforms
|
|
118
|
+
*/
|
|
119
|
+
#if 0
|
|
120
|
+
#ifndef WITH_MODULES
|
|
121
|
+
#define WITH_MODULES
|
|
122
|
+
#endif
|
|
123
|
+
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "NULL"
|
|
124
|
+
#endif
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Locale support
|
|
128
|
+
*/
|
|
129
|
+
#if 0
|
|
130
|
+
#ifndef XSLT_LOCALE_XLOCALE
|
|
131
|
+
#define XSLT_LOCALE_XLOCALE
|
|
132
|
+
#endif
|
|
133
|
+
#elif 1
|
|
134
|
+
#ifndef XSLT_LOCALE_WINAPI
|
|
135
|
+
#define XSLT_LOCALE_WINAPI
|
|
136
|
+
#endif
|
|
137
|
+
#endif
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* ATTRIBUTE_UNUSED:
|
|
141
|
+
*
|
|
142
|
+
* This macro is used to flag unused function parameters to GCC
|
|
143
|
+
*/
|
|
144
|
+
#ifdef __GNUC__
|
|
145
|
+
#ifdef HAVE_ANSIDECL_H
|
|
146
|
+
#include <ansidecl.h>
|
|
147
|
+
#endif
|
|
148
|
+
#ifndef ATTRIBUTE_UNUSED
|
|
149
|
+
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
|
150
|
+
#endif
|
|
151
|
+
#else
|
|
152
|
+
#define ATTRIBUTE_UNUSED
|
|
153
|
+
#endif
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* LIBXSLT_PUBLIC:
|
|
157
|
+
*
|
|
158
|
+
* This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows
|
|
159
|
+
*/
|
|
160
|
+
#if !defined LIBXSLT_PUBLIC
|
|
161
|
+
#if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
|
|
162
|
+
#define LIBXSLT_PUBLIC __declspec(dllimport)
|
|
163
|
+
#else
|
|
164
|
+
#define LIBXSLT_PUBLIC
|
|
165
|
+
#endif
|
|
166
|
+
#endif
|
|
167
|
+
|
|
168
|
+
#ifdef __cplusplus
|
|
169
|
+
}
|
|
170
|
+
#endif
|
|
171
|
+
|
|
172
|
+
#endif /* __XML_XSLTCONFIG_H__ */
|
|
@@ -0,0 +1,142 @@
|
|
|
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 Zlatkovic <igor@zlatkovic.com>
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#ifndef __XSLT_EXPORTS_H__
|
|
11
|
+
#define __XSLT_EXPORTS_H__
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* XSLTPUBFUN:
|
|
15
|
+
* XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
|
|
16
|
+
*
|
|
17
|
+
* Macros which declare an exportable function, an exportable variable and
|
|
18
|
+
* the calling convention used for functions.
|
|
19
|
+
*
|
|
20
|
+
* Please use an extra block for every platform/compiler combination when
|
|
21
|
+
* modifying this, rather than overlong #ifdef lines. This helps
|
|
22
|
+
* readability as well as the fact that different compilers on the same
|
|
23
|
+
* platform might need different definitions.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* XSLTPUBFUN:
|
|
28
|
+
*
|
|
29
|
+
* Macros which declare an exportable function
|
|
30
|
+
*/
|
|
31
|
+
#define XSLTPUBFUN
|
|
32
|
+
/**
|
|
33
|
+
* XSLTPUBVAR:
|
|
34
|
+
*
|
|
35
|
+
* Macros which declare an exportable variable
|
|
36
|
+
*/
|
|
37
|
+
#define XSLTPUBVAR extern
|
|
38
|
+
/**
|
|
39
|
+
* XSLTCALL:
|
|
40
|
+
*
|
|
41
|
+
* Macros which declare the called convention for exported functions
|
|
42
|
+
*/
|
|
43
|
+
#define XSLTCALL
|
|
44
|
+
|
|
45
|
+
/** DOC_DISABLE */
|
|
46
|
+
|
|
47
|
+
/* Windows platform with MS compiler */
|
|
48
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
|
49
|
+
#undef XSLTPUBFUN
|
|
50
|
+
#undef XSLTPUBVAR
|
|
51
|
+
#undef XSLTCALL
|
|
52
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
|
53
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
|
54
|
+
#define XSLTPUBVAR __declspec(dllexport)
|
|
55
|
+
#else
|
|
56
|
+
#define XSLTPUBFUN
|
|
57
|
+
#if !defined(LIBXSLT_STATIC)
|
|
58
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
|
59
|
+
#else
|
|
60
|
+
#define XSLTPUBVAR extern
|
|
61
|
+
#endif
|
|
62
|
+
#endif
|
|
63
|
+
#define XSLTCALL __cdecl
|
|
64
|
+
#if !defined _REENTRANT
|
|
65
|
+
#define _REENTRANT
|
|
66
|
+
#endif
|
|
67
|
+
#endif
|
|
68
|
+
|
|
69
|
+
/* Windows platform with Borland compiler */
|
|
70
|
+
#if defined(_WIN32) && defined(__BORLANDC__)
|
|
71
|
+
#undef XSLTPUBFUN
|
|
72
|
+
#undef XSLTPUBVAR
|
|
73
|
+
#undef XSLTCALL
|
|
74
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
|
75
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
|
76
|
+
#define XSLTPUBVAR __declspec(dllexport) extern
|
|
77
|
+
#else
|
|
78
|
+
#define XSLTPUBFUN
|
|
79
|
+
#if !defined(LIBXSLT_STATIC)
|
|
80
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
|
81
|
+
#else
|
|
82
|
+
#define XSLTPUBVAR extern
|
|
83
|
+
#endif
|
|
84
|
+
#endif
|
|
85
|
+
#define XSLTCALL __cdecl
|
|
86
|
+
#if !defined _REENTRANT
|
|
87
|
+
#define _REENTRANT
|
|
88
|
+
#endif
|
|
89
|
+
#endif
|
|
90
|
+
|
|
91
|
+
/* Windows platform with GNU compiler (Mingw) */
|
|
92
|
+
#if defined(_WIN32) && defined(__MINGW32__)
|
|
93
|
+
#undef XSLTPUBFUN
|
|
94
|
+
#undef XSLTPUBVAR
|
|
95
|
+
#undef XSLTCALL
|
|
96
|
+
/*
|
|
97
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
|
98
|
+
*/
|
|
99
|
+
#if !defined(LIBXSLT_STATIC)
|
|
100
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
|
101
|
+
#define XSLTPUBVAR __declspec(dllexport) extern
|
|
102
|
+
#else
|
|
103
|
+
#define XSLTPUBFUN
|
|
104
|
+
#if !defined(LIBXSLT_STATIC)
|
|
105
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
|
106
|
+
#else
|
|
107
|
+
#define XSLTPUBVAR extern
|
|
108
|
+
#endif
|
|
109
|
+
#endif
|
|
110
|
+
#define XSLTCALL __cdecl
|
|
111
|
+
#if !defined _REENTRANT
|
|
112
|
+
#define _REENTRANT
|
|
113
|
+
#endif
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
/* Cygwin platform, GNU compiler */
|
|
117
|
+
#if defined(_WIN32) && defined(__CYGWIN__)
|
|
118
|
+
#undef XSLTPUBFUN
|
|
119
|
+
#undef XSLTPUBVAR
|
|
120
|
+
#undef XSLTCALL
|
|
121
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
|
122
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
|
123
|
+
#define XSLTPUBVAR __declspec(dllexport)
|
|
124
|
+
#else
|
|
125
|
+
#define XSLTPUBFUN
|
|
126
|
+
#if !defined(LIBXSLT_STATIC)
|
|
127
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
|
128
|
+
#else
|
|
129
|
+
#define XSLTPUBVAR
|
|
130
|
+
#endif
|
|
131
|
+
#endif
|
|
132
|
+
#define XSLTCALL __cdecl
|
|
133
|
+
#endif
|
|
134
|
+
|
|
135
|
+
/* Compatibility */
|
|
136
|
+
#if !defined(LIBXSLT_PUBLIC)
|
|
137
|
+
#define LIBXSLT_PUBLIC XSLTPUBVAR
|
|
138
|
+
#endif
|
|
139
|
+
|
|
140
|
+
#endif /* __XSLT_EXPORTS_H__ */
|
|
141
|
+
|
|
142
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Summary: Locale handling
|
|
3
|
+
* Description: Interfaces for locale handling. Needed for language dependent
|
|
4
|
+
* sorting.
|
|
5
|
+
*
|
|
6
|
+
* Copy: See Copyright for the status of this software.
|
|
7
|
+
*
|
|
8
|
+
* Author: Nick Wellnhofer
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#ifndef __XML_XSLTLOCALE_H__
|
|
12
|
+
#define __XML_XSLTLOCALE_H__
|
|
13
|
+
|
|
14
|
+
#include <libxml/xmlstring.h>
|
|
15
|
+
|
|
16
|
+
#ifdef XSLT_LOCALE_XLOCALE
|
|
17
|
+
|
|
18
|
+
#include <locale.h>
|
|
19
|
+
#include <xlocale.h>
|
|
20
|
+
|
|
21
|
+
#ifdef __GLIBC__
|
|
22
|
+
/*locale_t is defined only if _GNU_SOURCE is defined*/
|
|
23
|
+
typedef __locale_t xsltLocale;
|
|
24
|
+
#else
|
|
25
|
+
typedef locale_t xsltLocale;
|
|
26
|
+
#endif
|
|
27
|
+
typedef xmlChar xsltLocaleChar;
|
|
28
|
+
|
|
29
|
+
#elif defined(XSLT_LOCALE_WINAPI)
|
|
30
|
+
|
|
31
|
+
#include <windows.h>
|
|
32
|
+
#include <winnls.h>
|
|
33
|
+
|
|
34
|
+
typedef LCID xsltLocale;
|
|
35
|
+
typedef wchar_t xsltLocaleChar;
|
|
36
|
+
|
|
37
|
+
#else
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* XSLT_LOCALE_NONE:
|
|
41
|
+
* Macro indicating that locale are not supported
|
|
42
|
+
*/
|
|
43
|
+
#ifndef XSLT_LOCALE_NONE
|
|
44
|
+
#define XSLT_LOCALE_NONE
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
typedef void *xsltLocale;
|
|
48
|
+
typedef xmlChar xsltLocaleChar;
|
|
49
|
+
|
|
50
|
+
#endif
|
|
51
|
+
|
|
52
|
+
xsltLocale xsltNewLocale(const xmlChar *langName);
|
|
53
|
+
void xsltFreeLocale(xsltLocale locale);
|
|
54
|
+
xsltLocaleChar *xsltStrxfrm(xsltLocale locale, const xmlChar *string);
|
|
55
|
+
int xsltLocaleStrcmp(xsltLocale locale, const xsltLocaleChar *str1, const xsltLocaleChar *str2);
|
|
56
|
+
|
|
57
|
+
#endif /* __XML_XSLTLOCALE_H__ */
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Summary: set of utilities for the XSLT engine
|
|
3
|
+
* Description: interfaces for the utilities module of the XSLT engine.
|
|
4
|
+
* things like message handling, profiling, and other
|
|
5
|
+
* generally useful routines.
|
|
6
|
+
*
|
|
7
|
+
* Copy: See Copyright for the status of this software.
|
|
8
|
+
*
|
|
9
|
+
* Author: Daniel Veillard
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#ifndef __XML_XSLTUTILS_H__
|
|
13
|
+
#define __XML_XSLTUTILS_H__
|
|
14
|
+
|
|
15
|
+
#include <libxslt/xsltconfig.h>
|
|
16
|
+
#ifdef HAVE_STDARG_H
|
|
17
|
+
#include <stdarg.h>
|
|
18
|
+
#endif
|
|
19
|
+
#include <libxml/xpath.h>
|
|
20
|
+
#include <libxml/dict.h>
|
|
21
|
+
#include <libxml/xmlerror.h>
|
|
22
|
+
#include "xsltexports.h"
|
|
23
|
+
#include "xsltInternals.h"
|
|
24
|
+
|
|
25
|
+
#ifdef __cplusplus
|
|
26
|
+
extern "C" {
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* XSLT_TODO:
|
|
31
|
+
*
|
|
32
|
+
* Macro to flag unimplemented blocks.
|
|
33
|
+
*/
|
|
34
|
+
#define XSLT_TODO \
|
|
35
|
+
xsltGenericError(xsltGenericErrorContext, \
|
|
36
|
+
"Unimplemented block at %s:%d\n", \
|
|
37
|
+
__FILE__, __LINE__);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* XSLT_STRANGE:
|
|
41
|
+
*
|
|
42
|
+
* Macro to flag that a problem was detected internally.
|
|
43
|
+
*/
|
|
44
|
+
#define XSLT_STRANGE \
|
|
45
|
+
xsltGenericError(xsltGenericErrorContext, \
|
|
46
|
+
"Internal error at %s:%d\n", \
|
|
47
|
+
__FILE__, __LINE__);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* IS_XSLT_ELEM:
|
|
51
|
+
*
|
|
52
|
+
* Checks that the element pertains to XSLT namespace.
|
|
53
|
+
*/
|
|
54
|
+
#define IS_XSLT_ELEM(n) \
|
|
55
|
+
(((n) != NULL) && ((n)->ns != NULL) && \
|
|
56
|
+
(xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* IS_XSLT_NAME:
|
|
60
|
+
*
|
|
61
|
+
* Checks the value of an element in XSLT namespace.
|
|
62
|
+
*/
|
|
63
|
+
#define IS_XSLT_NAME(n, val) \
|
|
64
|
+
(xmlStrEqual((n)->name, (const xmlChar *) (val)))
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* IS_XSLT_REAL_NODE:
|
|
68
|
+
*
|
|
69
|
+
* Check that a node is a 'real' one: document, element, text or attribute.
|
|
70
|
+
*/
|
|
71
|
+
#define IS_XSLT_REAL_NODE(n) \
|
|
72
|
+
(((n) != NULL) && \
|
|
73
|
+
(((n)->type == XML_ELEMENT_NODE) || \
|
|
74
|
+
((n)->type == XML_TEXT_NODE) || \
|
|
75
|
+
((n)->type == XML_CDATA_SECTION_NODE) || \
|
|
76
|
+
((n)->type == XML_ATTRIBUTE_NODE) || \
|
|
77
|
+
((n)->type == XML_DOCUMENT_NODE) || \
|
|
78
|
+
((n)->type == XML_HTML_DOCUMENT_NODE) || \
|
|
79
|
+
((n)->type == XML_COMMENT_NODE) || \
|
|
80
|
+
((n)->type == XML_PI_NODE)))
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
* Our own version of namespaced atributes lookup.
|
|
84
|
+
*/
|
|
85
|
+
XSLTPUBFUN xmlChar * XSLTCALL
|
|
86
|
+
xsltGetNsProp (xmlNodePtr node,
|
|
87
|
+
const xmlChar *name,
|
|
88
|
+
const xmlChar *nameSpace);
|
|
89
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
|
90
|
+
xsltGetCNsProp (xsltStylesheetPtr style,
|
|
91
|
+
xmlNodePtr node,
|
|
92
|
+
const xmlChar *name,
|
|
93
|
+
const xmlChar *nameSpace);
|
|
94
|
+
XSLTPUBFUN int XSLTCALL
|
|
95
|
+
xsltGetUTF8Char (const unsigned char *utf,
|
|
96
|
+
int *len);
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* XSLT Debug Tracing Tracing Types
|
|
100
|
+
*/
|
|
101
|
+
typedef enum {
|
|
102
|
+
XSLT_TRACE_ALL = -1,
|
|
103
|
+
XSLT_TRACE_NONE = 0,
|
|
104
|
+
XSLT_TRACE_COPY_TEXT = 1<<0,
|
|
105
|
+
XSLT_TRACE_PROCESS_NODE = 1<<1,
|
|
106
|
+
XSLT_TRACE_APPLY_TEMPLATE = 1<<2,
|
|
107
|
+
XSLT_TRACE_COPY = 1<<3,
|
|
108
|
+
XSLT_TRACE_COMMENT = 1<<4,
|
|
109
|
+
XSLT_TRACE_PI = 1<<5,
|
|
110
|
+
XSLT_TRACE_COPY_OF = 1<<6,
|
|
111
|
+
XSLT_TRACE_VALUE_OF = 1<<7,
|
|
112
|
+
XSLT_TRACE_CALL_TEMPLATE = 1<<8,
|
|
113
|
+
XSLT_TRACE_APPLY_TEMPLATES = 1<<9,
|
|
114
|
+
XSLT_TRACE_CHOOSE = 1<<10,
|
|
115
|
+
XSLT_TRACE_IF = 1<<11,
|
|
116
|
+
XSLT_TRACE_FOR_EACH = 1<<12,
|
|
117
|
+
XSLT_TRACE_STRIP_SPACES = 1<<13,
|
|
118
|
+
XSLT_TRACE_TEMPLATES = 1<<14,
|
|
119
|
+
XSLT_TRACE_KEYS = 1<<15,
|
|
120
|
+
XSLT_TRACE_VARIABLES = 1<<16
|
|
121
|
+
} xsltDebugTraceCodes;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* XSLT_TRACE:
|
|
125
|
+
*
|
|
126
|
+
* Control the type of xsl debugtrace messages emitted.
|
|
127
|
+
*/
|
|
128
|
+
#define XSLT_TRACE(ctxt,code,call) \
|
|
129
|
+
if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \
|
|
130
|
+
call
|
|
131
|
+
|
|
132
|
+
XSLTPUBFUN void XSLTCALL
|
|
133
|
+
xsltDebugSetDefaultTrace(xsltDebugTraceCodes val);
|
|
134
|
+
XSLTPUBFUN xsltDebugTraceCodes XSLTCALL
|
|
135
|
+
xsltDebugGetDefaultTrace(void);
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
* XSLT specific error and debug reporting functions.
|
|
139
|
+
*/
|
|
140
|
+
XSLTPUBVAR xmlGenericErrorFunc xsltGenericError;
|
|
141
|
+
XSLTPUBVAR void *xsltGenericErrorContext;
|
|
142
|
+
XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug;
|
|
143
|
+
XSLTPUBVAR void *xsltGenericDebugContext;
|
|
144
|
+
|
|
145
|
+
XSLTPUBFUN void XSLTCALL
|
|
146
|
+
xsltPrintErrorContext (xsltTransformContextPtr ctxt,
|
|
147
|
+
xsltStylesheetPtr style,
|
|
148
|
+
xmlNodePtr node);
|
|
149
|
+
XSLTPUBFUN void XSLTCALL
|
|
150
|
+
xsltMessage (xsltTransformContextPtr ctxt,
|
|
151
|
+
xmlNodePtr node,
|
|
152
|
+
xmlNodePtr inst);
|
|
153
|
+
XSLTPUBFUN void XSLTCALL
|
|
154
|
+
xsltSetGenericErrorFunc (void *ctx,
|
|
155
|
+
xmlGenericErrorFunc handler);
|
|
156
|
+
XSLTPUBFUN void XSLTCALL
|
|
157
|
+
xsltSetGenericDebugFunc (void *ctx,
|
|
158
|
+
xmlGenericErrorFunc handler);
|
|
159
|
+
XSLTPUBFUN void XSLTCALL
|
|
160
|
+
xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt,
|
|
161
|
+
void *ctx,
|
|
162
|
+
xmlGenericErrorFunc handler);
|
|
163
|
+
XSLTPUBFUN void XSLTCALL
|
|
164
|
+
xsltTransformError (xsltTransformContextPtr ctxt,
|
|
165
|
+
xsltStylesheetPtr style,
|
|
166
|
+
xmlNodePtr node,
|
|
167
|
+
const char *msg,
|
|
168
|
+
...);
|
|
169
|
+
|
|
170
|
+
XSLTPUBFUN int XSLTCALL
|
|
171
|
+
xsltSetCtxtParseOptions (xsltTransformContextPtr ctxt,
|
|
172
|
+
int options);
|
|
173
|
+
/*
|
|
174
|
+
* Sorting.
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
XSLTPUBFUN void XSLTCALL
|
|
178
|
+
xsltDocumentSortFunction (xmlNodeSetPtr list);
|
|
179
|
+
XSLTPUBFUN void XSLTCALL
|
|
180
|
+
xsltSetSortFunc (xsltSortFunc handler);
|
|
181
|
+
XSLTPUBFUN void XSLTCALL
|
|
182
|
+
xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
|
|
183
|
+
xsltSortFunc handler);
|
|
184
|
+
XSLTPUBFUN void XSLTCALL
|
|
185
|
+
xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
|
|
186
|
+
xmlNodePtr *sorts,
|
|
187
|
+
int nbsorts);
|
|
188
|
+
XSLTPUBFUN void XSLTCALL
|
|
189
|
+
xsltDoSortFunction (xsltTransformContextPtr ctxt,
|
|
190
|
+
xmlNodePtr * sorts,
|
|
191
|
+
int nbsorts);
|
|
192
|
+
XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
|
|
193
|
+
xsltComputeSortResult (xsltTransformContextPtr ctxt,
|
|
194
|
+
xmlNodePtr sort);
|
|
195
|
+
|
|
196
|
+
/*
|
|
197
|
+
* QNames handling.
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
|
201
|
+
xsltSplitQName (xmlDictPtr dict,
|
|
202
|
+
const xmlChar *name,
|
|
203
|
+
const xmlChar **prefix);
|
|
204
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
|
205
|
+
xsltGetQNameURI (xmlNodePtr node,
|
|
206
|
+
xmlChar **name);
|
|
207
|
+
|
|
208
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
|
209
|
+
xsltGetQNameURI2 (xsltStylesheetPtr style,
|
|
210
|
+
xmlNodePtr node,
|
|
211
|
+
const xmlChar **name);
|
|
212
|
+
|
|
213
|
+
/*
|
|
214
|
+
* Output, reuse libxml I/O buffers.
|
|
215
|
+
*/
|
|
216
|
+
XSLTPUBFUN int XSLTCALL
|
|
217
|
+
xsltSaveResultTo (xmlOutputBufferPtr buf,
|
|
218
|
+
xmlDocPtr result,
|
|
219
|
+
xsltStylesheetPtr style);
|
|
220
|
+
XSLTPUBFUN int XSLTCALL
|
|
221
|
+
xsltSaveResultToFilename (const char *URI,
|
|
222
|
+
xmlDocPtr result,
|
|
223
|
+
xsltStylesheetPtr style,
|
|
224
|
+
int compression);
|
|
225
|
+
XSLTPUBFUN int XSLTCALL
|
|
226
|
+
xsltSaveResultToFile (FILE *file,
|
|
227
|
+
xmlDocPtr result,
|
|
228
|
+
xsltStylesheetPtr style);
|
|
229
|
+
XSLTPUBFUN int XSLTCALL
|
|
230
|
+
xsltSaveResultToFd (int fd,
|
|
231
|
+
xmlDocPtr result,
|
|
232
|
+
xsltStylesheetPtr style);
|
|
233
|
+
XSLTPUBFUN int XSLTCALL
|
|
234
|
+
xsltSaveResultToString (xmlChar **doc_txt_ptr,
|
|
235
|
+
int * doc_txt_len,
|
|
236
|
+
xmlDocPtr result,
|
|
237
|
+
xsltStylesheetPtr style);
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* XPath interface
|
|
241
|
+
*/
|
|
242
|
+
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
|
|
243
|
+
xsltXPathCompile (xsltStylesheetPtr style,
|
|
244
|
+
const xmlChar *str);
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
* Profiling.
|
|
248
|
+
*/
|
|
249
|
+
XSLTPUBFUN void XSLTCALL
|
|
250
|
+
xsltSaveProfiling (xsltTransformContextPtr ctxt,
|
|
251
|
+
FILE *output);
|
|
252
|
+
XSLTPUBFUN xmlDocPtr XSLTCALL
|
|
253
|
+
xsltGetProfileInformation (xsltTransformContextPtr ctxt);
|
|
254
|
+
|
|
255
|
+
XSLTPUBFUN long XSLTCALL
|
|
256
|
+
xsltTimestamp (void);
|
|
257
|
+
XSLTPUBFUN void XSLTCALL
|
|
258
|
+
xsltCalibrateAdjust (long delta);
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* XSLT_TIMESTAMP_TICS_PER_SEC:
|
|
262
|
+
*
|
|
263
|
+
* Sampling precision for profiling
|
|
264
|
+
*/
|
|
265
|
+
#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
* Hooks for the debugger.
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
typedef enum {
|
|
272
|
+
XSLT_DEBUG_NONE = 0, /* no debugging allowed */
|
|
273
|
+
XSLT_DEBUG_INIT,
|
|
274
|
+
XSLT_DEBUG_STEP,
|
|
275
|
+
XSLT_DEBUG_STEPOUT,
|
|
276
|
+
XSLT_DEBUG_NEXT,
|
|
277
|
+
XSLT_DEBUG_STOP,
|
|
278
|
+
XSLT_DEBUG_CONT,
|
|
279
|
+
XSLT_DEBUG_RUN,
|
|
280
|
+
XSLT_DEBUG_RUN_RESTART,
|
|
281
|
+
XSLT_DEBUG_QUIT
|
|
282
|
+
} xsltDebugStatusCodes;
|
|
283
|
+
|
|
284
|
+
XSLTPUBVAR int xslDebugStatus;
|
|
285
|
+
|
|
286
|
+
typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node,
|
|
287
|
+
xsltTemplatePtr templ, xsltTransformContextPtr ctxt);
|
|
288
|
+
typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source);
|
|
289
|
+
typedef void (*xsltDropCallCallback) (void);
|
|
290
|
+
|
|
291
|
+
XSLTPUBFUN void XSLTCALL
|
|
292
|
+
xsltSetDebuggerStatus (int value);
|
|
293
|
+
XSLTPUBFUN int XSLTCALL
|
|
294
|
+
xsltGetDebuggerStatus (void);
|
|
295
|
+
XSLTPUBFUN int XSLTCALL
|
|
296
|
+
xsltSetDebuggerCallbacks (int no, void *block);
|
|
297
|
+
XSLTPUBFUN int XSLTCALL
|
|
298
|
+
xslAddCall (xsltTemplatePtr templ,
|
|
299
|
+
xmlNodePtr source);
|
|
300
|
+
XSLTPUBFUN void XSLTCALL
|
|
301
|
+
xslDropCall (void);
|
|
302
|
+
|
|
303
|
+
#ifdef __cplusplus
|
|
304
|
+
}
|
|
305
|
+
#endif
|
|
306
|
+
|
|
307
|
+
#endif /* __XML_XSLTUTILS_H__ */
|
|
308
|
+
|
|
309
|
+
|