\r
#ifdef HAVE_GOOD_STL\r
/**\r
+ * Indicates whether the QName has a prefix.\r
+ * @return true iff the prefix is non-empty\r
+ */\r
+ bool hasPrefix() const { return !m_prefix.empty(); }\r
+\r
+ /**\r
+ * Indicates whether the QName has a non-empty namespace.\r
+ * @return true iff the namespace is non-empty\r
+ */\r
+ bool hasNamespaceURI() const { return !m_uri.empty(); }\r
+\r
+ /**\r
+ * Indicates whether the QName has a non-empty local name.\r
+ * @return true iff the local name is non-empty\r
+ */\r
+ bool hasLocalPart() const { return !m_local.empty(); }\r
+\r
+ /**\r
* Returns the namespace prefix\r
* @return Null-terminated Unicode string containing the prefix, without the colon\r
*/\r
const XMLCh* getLocalPart() const { return m_local.c_str(); }\r
#else\r
/**\r
+ * Indicates whether the QName has a prefix.\r
+ * @return true iff the prefix is non-empty\r
+ */\r
+ bool hasPrefix() const { return m_prefix && *m_prefix; }\r
+\r
+ /**\r
+ * Indicates whether the QName has a non-empty namespace.\r
+ * @return true iff the namespace is non-empty\r
+ */\r
+ bool hasNamespaceURI() const { return m_uri && *m_uri; }\r
+\r
+ /**\r
+ * Indicates whether the QName has a non-empty local name.\r
+ * @return true iff the local name is non-empty\r
+ */\r
+ bool hasLocalPart() const { return m_local && *m_local; }\r
+\r
+ /**\r
* Returns the namespace prefix\r
* @return Null-terminated Unicode string containing the prefix, without the colon\r
*/\r
*/\r
extern XMLTOOL_API bool operator<(const QName& op1, const QName& op2);\r
\r
-#ifndef HAVE_GOOD_STL\r
/**\r
- * Returns true iff op1's components are equal to op2's components.\r
+ * Returns true iff op1's components are equal to op2's components, excluding prefix.\r
* @param op1 First qname to compare\r
* @param op2 Second qname to compare\r
*/\r
extern XMLTOOL_API bool operator==(const QName& op1, const QName& op2);\r
-#endif\r
\r
};\r
\r