41 #include <xmlstring.h> 61 #define XMLNS_NULL_NS_ID 0 63 #define XMLNS ((const xmlChar *)"xmlns") 66 #define XMLNS_SEPCH ':' 71 #define XMLNS_EQ(NS1,NS2) (((NS1) && (NS2)) && ((NS1)==(NS2))) 93 typedef struct xmlns_qname_t_ {
99 typedef struct xmlns_t_ {
128 typedef struct xmlns_pmap_t_ {
184 const xmlChar *modname,
226 const xmlChar *modname,
236 extern const xmlChar *
246 extern const xmlChar *
433 extern const xmlChar *
xmlns_id_t xmlns_find_ns_by_name_str(const xmlChar *name, uint32 namelen)
Find the NS ID from its name (counted string version)
Definition: xmlns.c:831
void xmlns_clear_modptrs(void *modptr)
Clear the module pointer for the namespace ID.
Definition: xmlns.c:1216
xmlns_id_t xmlns_inv_id(void)
Get the INVALID namespace ID.
Definition: xmlns.c:931
xmlns_id_t xmlns_find_ns_by_prefix(const xmlChar *pfix)
Find the NS ID from its prefix.
Definition: xmlns.c:755
xmlChar * nm_pfix
namespace prefix in mapping
Definition: xmlns.h:136
dlq provides general double-linked list and queue support:
represents one registered namespace
Definition: xmlns.h:99
status_t xmlns_register_ns(const xmlChar *ns, const xmlChar *pfix, const xmlChar *modname, void *modptr, xmlns_id_t *ns_id)
Register the specified namespace.
Definition: xmlns.c:494
xmlns_id_t xmlns_ncn_id(void)
Get the ID for the NETCONF Notifications namespace or 0 if it doesn't exist.
Definition: xmlns.c:999
xmlns_id_t xmlns_ywattrs_id(void)
Get the ID for the YumaWorks attributes namespace or 0 if it doesn't exist.
Definition: xmlns.c:1090
xmlChar * ns_module
module name associated with this namespace
Definition: xmlns.h:110
struct ncx_module_t_ * ns_mod
module backptr if module loaded for this namespace
Definition: xmlns.h:113
void xmlns_cleanup(void)
Cleanup module static data.
Definition: xmlns.c:458
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
xmlns_id_t xmlns_wda_id(void)
Get the ID for the wd:default XML attribute namespace or 0 if it doesn't exist.
Definition: xmlns.c:1071
void xmlns_free_qname(xmlns_qname_t *qname)
free a xmlns_qname_t struct
Definition: xmlns.c:1334
represents one QName data element
Definition: xmlns.h:93
xmlns_id_t xmlns_ns_id(void)
Get the ID for the XMLNS namespace or 0 if it doesn't exist.
Definition: xmlns.c:914
void xmlns_unregister_ns(xmlns_id_t ns_id)
Unregister the specified namespace.
Definition: xmlns.c:525
status_t xmlns_register_temp_ns(const xmlChar *ns, const xmlChar *pfix, xmlns_id_t *ns_id)
Register the specified temporary namespace.
Definition: xmlns.c:561
xmlChar * ns_pfix
XML prefix for namespace usually same as YANG module prefix.
Definition: xmlns.h:104
xmlns_id_t xmlns_xsi_id(void)
Get the ID for the XSD Instance (XSI) namespace or 0 if it doesn't exist.
Definition: xmlns.c:964
xmlns_id_t xmlns_yang_id(void)
Get the ID for the YANG namespace or 0 if it doesn't exist.
Definition: xmlns.c:1017
const xmlChar * xmlns_get_ns_prefix(xmlns_id_t ns_id)
Get the prefix for the specified namespace.
Definition: xmlns.c:669
xmlns_pmap_t * xmlns_new_pmap(uint32 buffsize)
malloc and initialize a new xmlns_pmap_t struct
Definition: xmlns.c:1249
const xmlChar * xmlns_get_module(xmlns_id_t nsid)
get the module name of the namespace ID
Definition: xmlns.c:1126
void * xmlns_get_modptr(xmlns_id_t nsid)
get the module pointer for the namespace ID
Definition: xmlns.c:1151
represents one namespace prefix mapping
Definition: xmlns.h:128
xmlns_id_t xmlns_find_ns_by_module(const xmlChar *modname)
Find the NS ID from its module name that registered it.
Definition: xmlns.c:712
xmlns_id_t xmlns_wildcard_id(void)
Get the ID for the base:1.1 wildcard namespace or 0 if it doesn't exist.
Definition: xmlns.c:1053
boolean ns_temporary
temporary flag used for unknown and other runtime namespace assignments
Definition: xmlns.h:118
xmlns_id_t xmlns_find_ns_by_name(const xmlChar *name)
Find the NS ID from its name.
Definition: xmlns.c:797
status_t
global error return code
Definition: status_enum.h:186
xmlns_id_t nsid
namespace ID
Definition: xmlns.h:94
xmlns_qname_t * xmlns_new_qname(void)
malloc and initialize a new xmlns_qname_t struct
Definition: xmlns.c:1310
void xmlns_check_deleted_ns(void)
Check if a deleted namespace is pending and free it.
Definition: xmlns.c:1382
void xmlns_free_pmap(xmlns_pmap_t *pmap)
free a xmlns_pmap_t struct
Definition: xmlns.c:1284
boolean ns_deleted
flag that the namespace is deleted and only actually remove this entry when no message processing is ...
Definition: xmlns.h:123
Global error messages for status code enumerations.
xmlns_id_t xmlns_xml_id(void)
Get the ID for the 1998 XML namespace or 0 if it doesn't exist.
Definition: xmlns.c:981
xmlns_id_t xmlns_ncx_id(void)
Get the ID for the NETCONF Extensions namespace or 0 if it doesn't exist.
Definition: xmlns.c:897
xmlChar * ns_name
namespace URI value
Definition: xmlns.h:107
uint16 xmlns_get_mod_count(void)
Get the total count of the currently loaded modules in the array of the Namespaces.
Definition: xmlns.c:1422
xmlns_id_t xmlns_nc_id(void)
Get the ID for the NETCONF namespace or 0 if it doesn't exist.
Definition: xmlns.c:880
xmlns_id_t xmlns_yin_id(void)
Get the ID for the YIN namespace or 0 if it doesn't exist.
Definition: xmlns.c:1035
xmlns_id_t xmlns_xs_id(void)
Get the ID for the XSD namespace or 0 if it doesn't exist.
Definition: xmlns.c:948
boolean nm_topattr
flag set if this xmlns is a top-level attribute
Definition: xmlns.h:139
xmlns_id_t nm_id
namespace ID in mapping
Definition: xmlns.h:133
boolean xmlns_ids_equal(xmlns_id_t ns1, xmlns_id_t ns2)
compare 2 namespace IDs only if they are both non-zero and return TRUE if they are equal ...
Definition: xmlns.c:1363
xmlns_id_t xmlns_origin_id(void)
Get the ID for the ietf-origin namespace or 0 if it doesn't exist.
Definition: xmlns.c:1108
void xmlns_set_modptrs(const xmlChar *modname, void *modptr)
get the module pointer for the namespace ID
Definition: xmlns.c:1176
void xmlns_init(void)
Initialize the module static variables.
Definition: xmlns.c:437
status_t xmlns_convert_temp_ns(xmlns_id_t nsid, const xmlChar *pfix, const xmlChar *modname, void *modptr)
Register the specified permanent namespace by converting the specified temporary NSID to a permanent ...
Definition: xmlns.c:597
const xmlChar * xmlns_get_ns_name(xmlns_id_t ns_id)
Get the name for the specified namespace.
Definition: xmlns.c:690
xmlns_id_t ns_id
namespace ID is slot number + 1
Definition: xmlns.h:101
const xmlChar * name
local-name
Definition: xmlns.h:95