1 #include "apachetools.h"
3 #include <libxslt/xslt.h>
4 #include <libxslt/transform.h>
5 #include <libxslt/xsltutils.h>
7 #define MODULE_NAME "mod_xmltools_module" /* 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 */
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 /* ------------------------------------------------------------------------------ */
21 #define CONFIG_LOCALE "XMLToolsDefaultLocale"
22 #define CONFIG_LOCALE_DIR "XMLToolsLocaleDir"
23 #define CONFIG_PRE_XSL "XMLToolsPreXSL"
24 #define CONFIG_POST_XSL "XMLToolsPostXSL"
29 module AP_MODULE_DECLARE_DATA mod_xmltools_module;
32 /* our config structure */
35 char* locale_dir; /* directory on disk where the locale directories live */
38 xsltStylesheetPtr pre_xsl;
39 xsltStylesheetPtr post_xsl;
41 } mod_xmltools_config;
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.
51 char* get_dtd_lang_file(string_array* params, char* default_locale, char* locale_dir);