#include <string.h>
#include <libxml/parser.h>
#include <libxml/catalog.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlmemory.h>
#include <libxml/SAX.h>
#include <libxml/xmlerror.h>
#include <libxml/uri.h>
#include <libxml/hash.h>
#include "utils.h"
#include "mlview-parsing-utils.h"
#include "mlview-global-settings.h"
#include "mlview-file-descriptor.h"
Go to the source code of this file.
Data Structures | |
struct | _MlViewCustomParserContext |
A custom xmlParserContext where we can store the mlview app context also. More... | |
Typedefs | |
typedef _MlViewCustomParserContext | MlViewCustomParserContext |
Functions | |
MlViewExternalSubsetDefinition * | mlview_external_subset_definition_new (const gchar *a_root_element_name, const gchar *a_external_id, const gchar *a_system_id) |
creates a new MlViewExternalSubsetDefinition. | |
void | mlview_external_subset_definition_destroy (MlViewExternalSubsetDefinition *a_def) |
destroys the MlViewExternalSubsetDefinition given in argument. | |
xmlDoc * | mlview_parsing_utils_load_xml_file (gchar *a_file_name, MlViewAppContext *a_app_context) |
gint | mlview_parsing_utils_save_xml_doc (xmlDoc *a_xml_doc, gchar *a_file_path, MlViewAppContext *a_app_context) |
Saves an xml file using the application wide settings. | |
xmlDtd * | mlview_parsing_utils_load_a_dtd (MlViewExternalSubsetDefinition *a_subset_def, MlViewAppContext *a_app_context) |
gint | mlview_parsing_utils_validate_dtd (xmlDoc *a_doc, xmlDtd *a_dtd, MlViewAppContext *a_app_context) |
MlViewExternalSubsetDefinition * | mlview_utils_get_a_copy_of_last_external_subset_def (void) |
found during the parsing of the last xml document if and only if the parsing has been triggered by calling the function mlview_parsing_utils_load_xml_file(gchar * a_file_name). | |
MlViewExternalSubsetDefinition * | mlview_parsing_utils_let_user_choose_a_dtd (MlViewAppContext *a_app_context, gchar *a_title) |
gint | mlview_parsing_utils_build_element_name_completion_list (MlViewAppContext *a_app_context, enum NODE_INSERTION_SCHEME a_insertion_scheme, xmlNode *a_current_xml_node, GList **a_feasible_names_ptr) |
Builds the list of the feasible element name that can be inserted before/after/beneath/ the current node. | |
gint | mlview_parsing_utils_build_attribute_name_completion_list (MlViewAppContext *a_app_context, xmlNode *a_current_xml_node, GList **a_attr_names_compl_list, gboolean a_required_attributes_only) |
enum MLVIEW_PARSING_UTILS_STATUS | mlview_parsing_utils_get_element_content_table (MlViewAppContext *a_app_context, xmlElementContent *a_element_content, GHashTable **a_element_content_table) |
enum MLVIEW_PARSING_UTILS_STATUS | mlview_parsing_utils_build_required_attributes_list (MlViewAppContext *a_app_context, xmlNode *a_node) |
Given an xml node (a_node), builds the required attributes list of that node. | |
enum MLVIEW_PARSING_UTILS_STATUS | mlview_parsing_utils_build_required_children_tree (MlViewAppContext *a_app_context, xmlNode **a_node) |
Given an xml node, this method builds the subtree of this node that is required by the schema (or by the DTD) Return. | |
GList * | mlview_parsing_utils_build_attribute_value_set (MlViewAppContext *a_app_context, xmlAttribute *a_attribute_desc, gint *a_last_id) |
GList * | mlview_parsing_utils_build_graphical_attribute_value_set (MlViewAppContext *a_app_context, xmlAttribute *a_attribute_desc, gint *a_last_id) |
Variables | |
int | xmlDoValidityCheckingDefaultValue |
|
Definition at line 58 of file mlview-parsing-utils.c. |
|
destroys the MlViewExternalSubsetDefinition given in argument.
Definition at line 184 of file mlview-parsing-utils.c. References _MlViewExternalSubsetDefinition::external_id, _MlViewExternalSubsetDefinition::root_element_name, and _MlViewExternalSubsetDefinition::system_id. Referenced by mlview_utils_get_a_copy_of_last_external_subset_def(). |
|
creates a new MlViewExternalSubsetDefinition.
Definition at line 144 of file mlview-parsing-utils.c. References _MlViewExternalSubsetDefinition::external_id, _MlViewExternalSubsetDefinition::root_element_name, and _MlViewExternalSubsetDefinition::system_id. Referenced by mlview_parsing_utils_let_user_choose_a_dtd(). |
|
Definition at line 1365 of file mlview-parsing-utils.c. References mlview_app_context_get_settings_value(), mlview_app_context_settings_exist(), and MLVIEW_IS_APP_CONTEXT. Referenced by mlview_attribute_picker_build_attribute_name_choice_list(), and mlview_parsing_utils_build_required_attributes_list(). |
|
Definition at line 1703 of file mlview-parsing-utils.c. References MLVIEW_IS_APP_CONTEXT. Referenced by mlview_parsing_utils_build_graphical_attribute_value_set(), and mlview_parsing_utils_build_required_attributes_list(). |
|
Builds the list of the feasible element name that can be inserted before/after/beneath/ the current node. and -2 if some bad parameter have been passed to this function.
Definition at line 1242 of file mlview-parsing-utils.c. References ADD_CHILD, INSERT_AFTER, INSERT_BEFORE, mlview_app_context_get_settings_value(), mlview_app_context_settings_exist(), NODE_INSERTION_SCHEME, and xmlValidGetValidElementsChildren(). Referenced by mvliew_node_type_picker_build_element_name_choice_list(). |
|
Definition at line 1799 of file mlview-parsing-utils.c. References MLVIEW_IS_APP_CONTEXT, and mlview_parsing_utils_build_attribute_value_set(). |
|
Given an xml node (a_node), builds the required attributes list of that node.
Definition at line 1512 of file mlview-parsing-utils.c. References APP_SETTINGS_NOT_AVAILABLE, BAD_PARAMETER, mlview_app_context_get_last_id_ptr(), mlview_app_context_get_settings_value(), mlview_app_context_settings_exist(), MLVIEW_IS_APP_CONTEXT, mlview_parsing_utils_build_attribute_name_completion_list(), mlview_parsing_utils_build_attribute_value_set(), MLVIEW_PARSING_UTILS_STATUS, NOK, OK, and VALIDATION_IS_OFF. Referenced by mlview_parsing_utils_build_required_children_tree(), mlview_xml_document_add_child_node(), mlview_xml_document_insert_next_sibling_node(), and mlview_xml_document_insert_prev_sibling_node(). |
|
Given an xml node, this method builds the subtree of this node that is required by the schema (or by the DTD) Return.
Definition at line 1622 of file mlview-parsing-utils.c. References APP_SETTINGS_NOT_AVAILABLE, BAD_PARAMETER, ELEMENT_DESC_NOT_FOUND, mlview_app_context_get_settings_value(), mlview_app_context_settings_exist(), MLVIEW_IS_APP_CONTEXT, mlview_parsing_utils_build_required_attributes_list(), MLVIEW_PARSING_UTILS_STATUS, NOK, OK, and VALIDATION_IS_OFF. Referenced by mlview_xml_document_add_child_node(), mlview_xml_document_insert_next_sibling_node(), and mlview_xml_document_insert_prev_sibling_node(). |
|
Definition at line 1440 of file mlview-parsing-utils.c. References BAD_PARAMETER, GENERIC_ASSERTION_ERROR, mlview_app_context_get_settings_value(), MLVIEW_IS_APP_CONTEXT, MLVIEW_PARSING_UTILS_STATUS, NOK, and OK. |
|
Definition at line 1196 of file mlview-parsing-utils.c. References CANCEL_BUTTON, mlview_app_context_get_file_selector(), mlview_app_context_set_window_icon(), mlview_external_subset_definition_new(), mlview_file_selection_run(), MLVIEW_SELECTED_BUTTON, OK_BUTTON, and WINDOW_CLOSED. Referenced by mlview_xml_document_associate_dtd_interactive(). |
|
Definition at line 1077 of file mlview-parsing-utils.c. References _MlViewExternalSubsetDefinition::external_id, mlview_app_context_display_buffered_error(), mlview_app_context_error_buffer_is_empty(), mlview_app_context_set_error_dialog_title(), and _MlViewExternalSubsetDefinition::system_id. Referenced by mlview_xml_document_associate_dtd(). |
|
Definition at line 1016 of file mlview-parsing-utils.c. References mlview_app_context_error(). Referenced by mlview_xml_document_open(). |
|
Saves an xml file using the application wide settings.
Definition at line 1057 of file mlview-parsing-utils.c. Referenced by mlview_settings_manager_save_settings_to_disk(), and mlview_xml_document_save(). |
|
Definition at line 1131 of file mlview-parsing-utils.c. References mlview_app_context_display_buffered_error(), mlview_app_context_error_buffer_is_empty(), and mlview_app_context_set_error_dialog_title(). Referenced by mlview_xml_document_validate(). |
|
found during the parsing of the last xml document if and only if the parsing has been triggered by calling the function mlview_parsing_utils_load_xml_file(gchar * a_file_name). Note that after a given xml document parsing, this function can only be
Definition at line 1176 of file mlview-parsing-utils.c. References mlview_external_subset_definition_destroy(). |
|
Definition at line 44 of file mlview-parsing-utils.c. |