39 #define _(String) dgettext (GETTEXT_PACKAGE, String)
65 GHashTable *parameters;
70 #define QSF_QOF_VERSION QOF_OBJECT_VERSION
78 #define QSF_ROOT_TAG "qof-qsf"
84 #define QSF_DEFAULT_NS "http://qof.sourceforge.net/"
88 #define QSF_DATE_LENGTH MAX_DATE_LENGTH
91 #define QSF_BOOK_TAG "book"
94 #define QSF_BOOK_GUID "book-guid"
96 #define QSF_BOOK_COUNT "count"
98 #define QSF_OBJECT_TAG "object"
100 #define QSF_OBJECT_TYPE "type"
102 #define QSF_OBJECT_COUNT "count"
104 #define QSF_XML_VERSION "1.0"
124 #define QSF_OBJECT_KVP "path"
126 #define QSF_OBJECT_VALUE "value"
133 #define MAP_ROOT_TAG "qsf-map"
144 #define MAP_DEFINITION_TAG "definition"
151 #define MAP_DEFINE_TAG "define"
155 #define MAP_ITERATE_ATTR "foreach"
226 #define MAP_DEFAULT_TAG "default"
237 #define MAP_OBJECT_TAG "object"
248 #define MAP_CALCULATE_TAG "calculate"
257 #define MAP_QOF_VERSION "qof_version"
267 #define MAP_NAME_ATTR "name"
276 #define MAP_TYPE_ATTR "type"
286 #define MAP_VALUE_ATTR "value"
290 #define MAP_OBJECT_ATTR "object"
300 #define MAP_E_TYPE "e_type"
304 #define MAP_ENUM_TYPE "enum"
307 #define QSF_BOOLEAN_DEFAULT "boolean"
319 #define QSF_CONDITIONAL "if"
331 #define QSF_CONDITIONAL_SET "set"
355 #define QSF_CONDITIONAL_ELSE "else"
363 #define QSF_OPTION "option"
373 #define QSF_FORMATTING_OPTION "format"
411 #define QSF_XSD_TIME QOF_UTC_DATE_FORMAT
414 #define QSF_XML_BOOLEAN_TEST "true"
417 #define QSF_OBJECT_SCHEMA "qsf-object.xsd.xml"
420 #define QSF_MAP_SCHEMA "qsf-map.xsd.xml"
482 GHashTable *qsf_calculate_hash, *qsf_default_hash;
558 const gchar *object_path;
559 const gchar *map_path;
641 const gchar * schema_filename, xmlDocPtr doc);
gint map_calculated_count
struct QsfValidates_s QsfValidator
Validation metadata.
void(* QsfNodeCB)(xmlNodePtr, xmlNsPtr, QsfParam *)
map and qsf object callback
void qsf_object_validation_handler(xmlNodePtr child, xmlNsPtr ns, QsfValidator *valid)
Checks all incoming objects for QOF registration.
gint qsf_check_tag(QsfParam *params, gchar *qof_type)
shorthand function
gboolean is_qsf_object_with_map(const gchar *path, gchar *map_file)
Validate a QSF file and a selected QSF map.
gboolean is_qsf_object(const gchar *path)
Validate a QSF file and identify a suitable QSF map.
KvpValueType
possible types in the union KvpValue
void qsf_valid_foreach(xmlNodePtr parent, QsfValidCB cb, struct QsfNodeIterate *qsfiter, QsfValidator *valid)
gboolean qsf_is_valid(const gchar *schema_dir, const gchar *schema_filename, xmlDocPtr doc)
Compares an xmlDoc in memory against the schema file.
gint32 QofErrorId
The ID of this error.
gboolean is_qsf_object_be(QsfParam *params)
Validate a QSF file and identify a suitable QSF map.
gint qsf_strings_equal(const xmlChar *node_name, gchar *tag_name)
shorthand function
gint qsf_compare_tag_strings(const xmlChar *node_name, gchar *tag_name)
shorthand function
struct _KvpValue KvpValue
gboolean is_our_qsf_object(const gchar *path)
Validate a QSF file.
One iterator, two typedefs.
GList ** qsf_map_prepare_list(GList **maps)
Prepare the default list of maps.
gint qof_registered_count
QsfStatus
Status of various object during mapping.
void qsf_node_foreach(xmlNodePtr parent, QsfNodeCB cb, struct QsfNodeIterate *qsfiter, QsfParam *params)
KvpValue * string_to_kvp_value(const gchar *content, KvpValueType type)
Convert a string value into KvpValue.
gboolean is_qsf_object_with_map_be(gchar *map_path, QsfParam *params)
Validate a QSF file and a selected QSF map.
struct QsfObject_s QsfObject
Holds a description of the QofObject.
gboolean is_qsf_map_be(QsfParam *params)
Validate a QSF map file.
gboolean is_qsf_map(const gchar *path)
Validate a QSF map file.
gboolean is_our_qsf_object_be(QsfParam *params)
Validate a QSF file and determine type.
gint qsf_is_element(xmlNodePtr a, xmlNsPtr ns, gchar *c)
shorthand function
Holds a description of the QofObject.
xmlDocPtr qsf_object_convert(xmlDocPtr mapDoc, xmlNodePtr qsf_root, QsfParam *params)
Convert between QSF objects.
void qsf_book_node_handler(xmlNodePtr child, xmlNsPtr qsf_ns, QsfParam *params)
Book and book-guid node handler.
GHashTable * object_table
struct QsfMetadata_s QsfParam
QSF Parameters.
void qsf_object_node_handler(xmlNodePtr child, xmlNsPtr qsf_ns, QsfParam *params)
void(* QsfValidCB)(xmlNodePtr, xmlNsPtr, QsfValidator *)
validator callback