|
jabberd14 1.6.2
|
#include <jabberdlib.h>
Public Member Functions | |
| ns_decl_list () | |
| ns_decl_list (const xmlnode node) | |
| void | update (const std::string &prefix, const std::string &ns_iri) |
| void | delete_last (const std::string &prefix) |
| char const * | get_nsprefix (const std::string &iri) const |
| char const * | get_nsprefix (const std::string &iri, bool accept_default_prefix) const |
| char const * | get_nsiri (const std::string &prefix) const |
| bool | check_prefix (const std::string &prefix, const std::string &ns_iri) const |
This class represents and manages a list of bindings from namespace prefixes to namespace IRIs
| xmppd::ns_decl_list::ns_decl_list | ( | ) |
| xmppd::ns_decl_list::ns_decl_list | ( | const xmlnode | node | ) |
create a namespace declaration list from the namespaces defined on a node
References NS_XML, NS_XMLNS, update(), xmlnode_get_data(), xmlnode_get_firstattrib(), xmlnode_get_localname(), xmlnode_get_namespace(), and xmlnode_get_nextsibling().
| bool xmppd::ns_decl_list::check_prefix | ( | const std::string & | prefix, |
| const std::string & | ns_iri | ||
| ) | const |
check if a namespace is already declared as we need it
| prefix | the prefix we want to check |
| ns_iri | the IRI we check if the prefix maps to it |
References get_nsiri().
Referenced by get_nsprefix().
| void xmppd::ns_decl_list::delete_last | ( | const std::string & | prefix | ) |
delete the last declaration of a prefix
| prefix | the prefix, that should get undeclared |
| char const * xmppd::ns_decl_list::get_nsiri | ( | const std::string & | prefix | ) | const |
get the namespace IRI, that is currently bound to a namespace prefix
| prefix | the namespace prefix to check |
| std::invalid_argument | if prefix is not bound to a namespace |
Referenced by check_prefix().
| char const * xmppd::ns_decl_list::get_nsprefix | ( | const std::string & | iri, |
| bool | accept_default_prefix | ||
| ) | const |
get the latest prefix, that is bould to a namespace IRI
| iri | the namespace IRI to search for |
| accept_default_prefix | if set to false, the method will only search for a non-default prefix |
| std::invalid_argument | if namespace is not declared |
References check_prefix().
| char const * xmppd::ns_decl_list::get_nsprefix | ( | const std::string & | iri | ) | const |
get the latest prefix, that is bould to a namespace IRI
| iri | the namespace IRI to search for |
| std::invalid_argument | if namespace is not declared |
Referenced by dialback_in_read(), dialback_out_read(), expat_startElement(), and xmlnode_put_expat_attribs().
| void xmppd::ns_decl_list::update | ( | const std::string & | prefix, |
| const std::string & | ns_iri | ||
| ) |
add a declared prefix to the list of namespace prefix declarations
| prefix | namespace prefix to add |
| ns_iri | namespace IRI to add |
Referenced by mio_write_root(), and ns_decl_list().
1.7.4