summaryrefslogtreecommitdiffstats
path: root/worker/xml_helper.h
blob: 0d6155b0f1bae1068f9b8c7b033596717c5559eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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:*"

enum {
    FIND_NAME = 1,
    FIND_VALUE
};

extern xmlChar *default_namespace_prefix;

xmlChar *get_default_namespace(xmlDocPtr doc);

int validate_policy(const char *policy_file_name, char **ipa_policy_type, char **xslt_file_name);

int print_all_attributes(const xmlNode *node);

char *find_by_xpath(const xmlDocPtr doc, const xmlChar * xpath_expr, const int type);