public:\r
/**\r
* Constructor\r
- * @param uri namespace URI\r
- * @param prefix namespace prefix (without the colon)\r
+ * @param uri namespace URI\r
+ * @param prefix namespace prefix (without the colon)\r
+ * @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations\r
*/\r
- Namespace(const XMLCh* uri=NULL, const XMLCh* prefix=NULL);\r
+ Namespace(const XMLCh* uri=NULL, const XMLCh* prefix=NULL, bool alwaysDeclare=false);\r
\r
~Namespace();\r
#ifndef HAVE_GOOD_STL\r
#endif\r
\r
/**\r
+ * Returns true iff the namespace should always be declared regardless of in-scope declarations\r
+ * @return the alwaysDeclared setting\r
+ */\r
+ const bool alwaysDeclare() const { return m_pinned; } \r
+\r
+ /**\r
* Sets the namespace prefix\r
* @param prefix Null-terminated Unicode string containing the prefix, without the colon\r
*/\r
* @param uri Null-terminated Unicode string containing the URI\r
*/\r
void setNamespaceURI(const XMLCh* uri);\r
+\r
+ /**\r
+ * Sets the alwaysDeclared property\r
+ * @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations\r
+ */\r
+ void setAlwaysDeclare(bool alwaysDeclare) { m_pinned = alwaysDeclare; } \r
\r
private:\r
+ bool m_pinned;\r
#ifdef HAVE_GOOD_STL\r
xstring m_uri;\r
xstring m_prefix;\r