23 #ifndef XCCDF_ELEMENTS_H_
24 #define XCCDF_ELEMENTS_H_
29 #include "common/util.h"
30 #include "common/elements.h"
32 #include <libxml/xmlreader.h>
46 bool xccdf_is_supported_namespace(xmlNs *ns);
60 XCCDFE_RESULT_BENCHMARK,
65 XCCDFE_CHECK_CONTENT_REF,
95 XCCDFE_CPE2_PLATFORMSPEC,
96 XCCDFE_RESULT_PROFILE,
117 XCCDFE_TARGET_ADDRESS,
119 XCCDFE_TARGET_IDENTIFIER,
125 XCCDFE_BENCHMARK_REF,
130 xccdf_element_t xccdf_element_get(xmlTextReaderPtr reader);
132 #define XCCDF_ASSERT_ELEMENT(reader, element) do { if (xccdf_element_get(reader) != element) return false; } while(false)
137 XCCDFA_AUTHENTICATED,
157 XCCDFA_INTERFACEHINT,
167 XCCDFA_PARENTCONTEXT,
170 XCCDFA_PROHIBITCHANGES,
194 bool xccdf_attribute_has(xmlTextReaderPtr reader, xccdf_attribute_t attr);
195 const char *xccdf_attribute_get(xmlTextReaderPtr reader, xccdf_attribute_t attr);
196 char *xccdf_attribute_copy(xmlTextReaderPtr reader, xccdf_attribute_t attr);
197 bool xccdf_attribute_get_bool(xmlTextReaderPtr reader, xccdf_attribute_t attr);
198 int xccdf_attribute_get_int(xmlTextReaderPtr reader, xccdf_attribute_t attr);
199 float xccdf_attribute_get_float(xmlTextReaderPtr reader, xccdf_attribute_t attr);
203 void xccdf_print_depth(
int depth);
204 void xccdf_print_max(
const char *str,
int max,
const char *ellipsis);
205 void xccdf_print_max_text(
const struct oscap_text *txt,
int max,
const char *ellipsis);
206 void xccdf_print_textlist(
struct oscap_text_iterator *txt,
int depth,
int max,
const char *ellipsis);