#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <libxml/relaxng.h>
#include <libxslt/xslt.h>
#include <libxslt/transform.h>
#include <libxslt/security.h>
#include <libxslt/xsltutils.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include "crmcommon_private.h"
#include <crm/common/xml_compat.h>
Go to the source code of this file.
|
const char * | pcmk__highest_schema_name (void) |
|
GList * | pcmk__find_x_0_schema (void) |
|
void | pcmk__load_schemas_from_dir (const char *dir) |
|
void | pcmk__sort_schemas (void) |
|
void | crm_schema_init (void) |
|
void | crm_schema_cleanup (void) |
|
GList * | pcmk__get_schema (const char *name) |
|
int | pcmk__cmp_schemas_by_name (const char *schema1_name, const char *schema2_name) |
|
bool | pcmk__validate_xml (xmlNode *xml_blob, const char *validation, xmlRelaxNGValidityErrorFunc error_handler, void *error_handler_context) |
|
bool | pcmk__configured_schema_validates (xmlNode *xml) |
|
int | pcmk__update_schema (xmlNode **xml, const char *max_schema_name, bool transform, bool to_logs) |
| Update CIB XML to latest schema that validates it. More...
|
|
int | pcmk_update_configured_schema (xmlNode **xml) |
|
int | pcmk__update_configured_schema (xmlNode **xml, bool to_logs) |
| Update XML from its configured schema to the latest major series. More...
|
|
GList * | pcmk__schema_files_later_than (const char *name) |
|
void | pcmk__build_schema_xml_node (xmlNode *parent, const char *name, GList **already_included) |
|
const char * | pcmk__remote_schema_dir (void) |
|
void | pcmk__warn_if_schema_deprecated (const char *schema) |
|
const char * | xml_latest_schema (void) |
|
const char * | get_schema_name (int version) |
|
int | get_schema_version (const char *name) |
|
int | update_validation (xmlNode **xml, int *best, int max, gboolean transform, gboolean to_logs) |
|
gboolean | validate_xml (xmlNode *xml_blob, const char *validation, gboolean to_logs) |
|
gboolean | validate_xml_verbose (const xmlNode *xml_blob) |
|
gboolean | cli_config_update (xmlNode **xml, int *best_version, gboolean to_logs) |
|
◆ schema_strdup_printf
◆ SCHEMA_ZERO
#define SCHEMA_ZERO { .v = { 0, 0 } } |
◆ cli_config_update()
gboolean cli_config_update |
( |
xmlNode ** |
xml, |
|
|
int * |
best_version, |
|
|
gboolean |
to_logs |
|
) |
| |
◆ crm_schema_cleanup()
void crm_schema_cleanup |
( |
void |
| ) |
|
◆ crm_schema_init()
void crm_schema_init |
( |
void |
| ) |
|
◆ get_schema_name()
const char* get_schema_name |
( |
int |
version | ) |
|
◆ get_schema_version()
int get_schema_version |
( |
const char * |
name | ) |
|
◆ pcmk__build_schema_xml_node()
void pcmk__build_schema_xml_node |
( |
xmlNode * |
parent, |
|
|
const char * |
name, |
|
|
GList ** |
already_included |
|
) |
| |
◆ pcmk__cmp_schemas_by_name()
int pcmk__cmp_schemas_by_name |
( |
const char * |
schema1_name, |
|
|
const char * |
schema2_name |
|
) |
| |
◆ pcmk__configured_schema_validates()
bool pcmk__configured_schema_validates |
( |
xmlNode * |
xml | ) |
|
◆ pcmk__find_x_0_schema()
GList* pcmk__find_x_0_schema |
( |
void |
| ) |
|
◆ pcmk__get_schema()
GList* pcmk__get_schema |
( |
const char * |
name | ) |
|
◆ pcmk__highest_schema_name()
const char* pcmk__highest_schema_name |
( |
void |
| ) |
|
◆ pcmk__load_schemas_from_dir()
void pcmk__load_schemas_from_dir |
( |
const char * |
dir | ) |
|
◆ pcmk__remote_schema_dir()
const char* pcmk__remote_schema_dir |
( |
void |
| ) |
|
◆ pcmk__schema_files_later_than()
GList* pcmk__schema_files_later_than |
( |
const char * |
name | ) |
|
◆ pcmk__sort_schemas()
void pcmk__sort_schemas |
( |
void |
| ) |
|
◆ pcmk__update_configured_schema()
int pcmk__update_configured_schema |
( |
xmlNode ** |
xml, |
|
|
bool |
to_logs |
|
) |
| |
Update XML from its configured schema to the latest major series.
- Parameters
-
[in,out] | xml | XML to update |
[in] | to_logs | If false, certain validation errors will be sent to stderr rather than logged |
- Returns
- Standard Pacemaker return code
Definition at line 1257 of file schemas.c.
◆ pcmk__update_schema()
int pcmk__update_schema |
( |
xmlNode ** |
xml, |
|
|
const char * |
max_schema_name, |
|
|
bool |
transform, |
|
|
bool |
to_logs |
|
) |
| |
Update CIB XML to latest schema that validates it.
- Parameters
-
[in,out] | xml | XML to update (may be freed and replaced after being transformed) |
[in] | max_schema_name | If not NULL, do not update xml to any schema later than this one |
[in] | transform | If false, do not update xml to any schema that requires an XSL transform |
[in] | to_logs | If false, certain validation errors will be sent to stderr rather than logged |
- Returns
- Standard Pacemaker return code
Definition at line 1141 of file schemas.c.
◆ pcmk__validate_xml()
bool pcmk__validate_xml |
( |
xmlNode * |
xml_blob, |
|
|
const char * |
validation, |
|
|
xmlRelaxNGValidityErrorFunc |
error_handler, |
|
|
void * |
error_handler_context |
|
) |
| |
◆ pcmk__warn_if_schema_deprecated()
void pcmk__warn_if_schema_deprecated |
( |
const char * |
schema | ) |
|
◆ pcmk_update_configured_schema()
int pcmk_update_configured_schema |
( |
xmlNode ** |
xml | ) |
|
◆ update_validation()
int update_validation |
( |
xmlNode ** |
xml_blob, |
|
|
int * |
best, |
|
|
int |
max, |
|
|
gboolean |
transform, |
|
|
gboolean |
to_logs |
|
) |
| |
◆ validate_xml()
gboolean validate_xml |
( |
xmlNode * |
xml_blob, |
|
|
const char * |
validation, |
|
|
gboolean |
to_logs |
|
) |
| |
◆ validate_xml_verbose()
gboolean validate_xml_verbose |
( |
const xmlNode * |
xml_blob | ) |
|
◆ xml_latest_schema()
const char* xml_latest_schema |
( |
void |
| ) |
|