]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/apachemods/mod_xmltools.h
8dd7e63994d8cbc13b4b3b32bd5d39b6aba92425
[working/Evergreen.git] / Open-ILS / src / apachemods / mod_xmltools.h
1 #include "apachetools.h"
2 #include "xmltools.h"
3 #include <libxslt/xslt.h>
4 #include <libxslt/transform.h>
5 #include <libxslt/xsltutils.h>
6
7 #define MODULE_NAME             "mod_xmltools" /* our module name */
8 #define PARAM_LOCALE            "locale"                        /* the URL param for the local directory */
9 #define LANG_DTD                        "lang.dtd"              /* the DTD for the test entities */
10
11
12 /* ------------------------------------------------------------------------------ */
13 /* Apache config items.  These are defaults which are only  used if they are not
14         overriden by the Apache config or URL where appropriate */
15 /* ------------------------------------------------------------------------------ */
16 /* The default directory where the local files are stored */
17 #define DEFAULT_LOCALE_DIR              "/openils/var/locale"
18 #define DEFAULT_LOCALE                  "en-US"                 
19 /* ------------------------------------------------------------------------------ */
20
21 #define CONFIG_LOCALE "XMLToolsDefaultLocale"
22 #define CONFIG_LOCALE_DIR "XMLToolsLocaleDir"
23 #define CONFIG_PRE_XSL "XMLToolsPreXSL"
24 #define CONFIG_POST_XSL "XMLToolsPostXSL"
25
26
27
28 /* This module */
29 module AP_MODULE_DECLARE_DATA mod_xmltools;
30
31
32 /* our config structure */
33 typedef struct {
34
35         char* locale_dir;                               /* directory on disk where the locale directories live */
36         char* default_locale;
37
38         xsltStylesheetPtr pre_xsl;
39         xsltStylesheetPtr post_xsl;
40
41 } mod_xmltools_config;
42
43
44
45 /* allocates a char* to hold the name of the DTD language file 
46         Prints to stderr and returns NULL if there was an error loading the file 
47         default_locale comes from the apache config and is used only if no 
48         locale is provided via URL 
49         locale_dir also comes from the apache config.
50         */
51 char* get_dtd_lang_file(string_array* params, char* default_locale, char* locale_dir);