diff options
Diffstat (limited to 'worker/xml_helper.h')
-rw-r--r-- | worker/xml_helper.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/worker/xml_helper.h b/worker/xml_helper.h new file mode 100644 index 0000000..7cd7dc3 --- /dev/null +++ b/worker/xml_helper.h @@ -0,0 +1,21 @@ +#include <libxml/tree.h> +#include <libxml/parser.h> +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> +#include <libxml/relaxng.h> + +#define XMLCHARLEN 255 +#define XSLT_METADATA_NAMESPACE (xmlChar *) "http://freeipa.org/xsl/metadata/1.0" +#define XSLT_METADATA_NAMESPACE_PREFIX (xmlChar *) "md" +#define XPATH_OUTPUT_HANDLER (xmlChar *) "//md:output_handler/md:*" + +extern xmlChar *default_namespace_prefix; + +int validate_policy(const char *policy_file_name, xmlChar **default_namespace, char **ipa_policy_type, char **xslt_file_name); + +int print_all_attributes(xmlNode *node); + +char *find_name_by_xpath(xmlDocPtr doc, xmlChar * xpath_expr, xmlChar * prefix, + xmlChar * namespace); +char *find_value_by_xpath(const xmlDocPtr doc, const xmlChar * xpath_expr, const xmlChar * prefix, + const xmlChar * namespace); |