libdom
|
#include <string.h>
#include <dom/dom.h>
#include "utils/namespace.h"
#include "utils/validate.h"
#include "utils/utils.h"
Functions | |
dom_exception | dom_namespace_finalise (void) |
dom_exception | _dom_namespace_validate_qname (dom_string *qname, dom_string *namespace) |
dom_exception | _dom_namespace_split_qname (dom_string *qname, dom_string **prefix, dom_string **localname) |
dom_string * | _dom_namespace_get_xml_prefix (void) |
dom_string * | _dom_namespace_get_xmlns_prefix (void) |
Variables | |
dom_string * | dom_namespaces [DOM_NAMESPACE_COUNT] |
dom_string * _dom_namespace_get_xml_prefix | ( | void | ) |
Get the XML prefix dom_string
Note: The client of this function may or may not call the dom_string_ref on the returned dom_string, because this string will only be destroyed when the dom_finalise is called. But if the client call dom_string_ref, it must call dom_string_unref to maintain a correct ref count of the dom_string.
dom_string * _dom_namespace_get_xmlns_prefix | ( | void | ) |
Get the XMLNS prefix dom_string.
Note: The client of this function may or may not call the dom_string_ref on the returned dom_string, because this string will only be destroyed when the dom_finalise is called. But if the client call dom_string_ref, it must call dom_string_unref to maintain a correct ref count of the dom_string.
dom_exception _dom_namespace_split_qname | ( | dom_string * | qname, |
dom_string ** | prefix, | ||
dom_string ** | localname ) |
Split a QName into a namespace prefix and localname string
qname | The qname to split |
prefix | Pointer to location to receive prefix |
localname | Pointer to location to receive localname |
If there is no prefix present in ::qname, then ::prefix will be NULL.
::prefix and ::localname will be referenced. The caller should unreference them once finished.
dom_exception _dom_namespace_validate_qname | ( | dom_string * | qname, |
dom_string * | namespace ) |
Ensure a QName is valid
qname | The qname to validate |
namespace | The namespace URI associated with the QName, or NULL |
dom_exception dom_namespace_finalise | ( | void | ) |
Finalise the namespace component
dom_string* dom_namespaces[DOM_NAMESPACE_COUNT] |