A class to be used to represent XML qualified names. More...
#include <QName.h>
Public Member Functions | |
const std::string & | getLocalPart () const |
It returns the local part of the qualified name. More... | |
const std::string & | getPrefix () const |
It returns the namespace prefix part of the qualified name. More... | |
std::string | getQualifiedName () const |
It returns the qualified name based on prefix and local part. More... | |
QName & | operator= (const QName &rhs) |
Assignment operator. More... | |
QName () | |
Constructor. More... | |
QName (const std::string &prefix, const std::string &localPart) | |
Constructor. More... | |
QName (const QName &rhs) | |
Copy constructor. More... | |
void | setLocalPart (const std::string &localPart) |
It sets the local part of the qualified name. More... | |
void | setPrefix (const std::string &prefix) |
It sets the namespace prefix part of the qualified name. More... | |
~QName () | |
Destructor. More... | |
Private Attributes | |
std::string | m_localPart |
The local part of the qualified name. More... | |
std::string | m_prefix |
The namespace prefix part of the qualified name. It must be associated with a namespace URI reference in the namespace declaration. More... | |
A class to be used to represent XML qualified names.
Since URI references can be long and may contain prohibited characters for element/attribute naming, QNames are used to create a mapping between the URI and a namespace prefix. The mapping enables the abbreviation of URIs, therefore it achieves a more convenient way to write XML documents. For more details see: http://www.w3.org/TR/REC-xml-names/#ns-qualnames.
te::xsd::QName::QName | ( | const std::string & | prefix, |
const std::string & | localPart | ||
) |
te::xsd::QName::QName | ( | const QName & | rhs | ) |
const std::string & te::xsd::QName::getLocalPart | ( | ) | const |
const std::string & te::xsd::QName::getPrefix | ( | ) | const |
std::string te::xsd::QName::getQualifiedName | ( | ) | const |
te::xsd::QName & te::xsd::QName::operator= | ( | const QName & | rhs | ) |
Assignment operator.
rhs | Right-hand-side object. |
Definition at line 49 of file QName.cpp.
References m_localPart, and m_prefix.
void te::xsd::QName::setLocalPart | ( | const std::string & | localPart | ) |
void te::xsd::QName::setPrefix | ( | const std::string & | prefix | ) |
|
private |
The local part of the qualified name.
Definition at line 121 of file QName.h.
Referenced by operator=().
|
private |
The namespace prefix part of the qualified name. It must be associated with a namespace URI reference in the namespace declaration.
Definition at line 120 of file QName.h.
Referenced by operator=().