+ else {
+ if (ns.alwaysDeclare())
+ const_cast<Namespace&>(*i).setAlwaysDeclare(true);
+ switch (ns.usage()) {
+ case Namespace::Indeterminate:
+ break;
+ case Namespace::VisiblyUsed:
+ const_cast<Namespace&>(*i).setUsage(Namespace::VisiblyUsed);
+ break;
+ case Namespace::NonVisiblyUsed:
+ if (i->usage() == Namespace::Indeterminate)
+ const_cast<Namespace&>(*i).setUsage(Namespace::NonVisiblyUsed);
+ break;
+ }
+ }
+}
+
+void AbstractXMLObject::removeNamespace(const Namespace& ns)
+{
+ m_namespaces.erase(ns);
+}
+
+const QName* AbstractXMLObject::getSchemaType() const
+{
+ return m_typeQname;
+}
+
+const XMLCh* AbstractXMLObject::getXMLID() const
+{
+ return nullptr;
+}
+
+xmlconstants::xmltooling_bool_t AbstractXMLObject::getNil() const
+{
+ return m_nil;
+}
+
+void AbstractXMLObject::nil(xmlconstants::xmltooling_bool_t value)
+{
+ if (m_nil != value) {
+ releaseThisandParentDOM();
+ m_nil = value;
+ }
+}
+
+bool AbstractXMLObject::hasParent() const
+{
+ return m_parent != nullptr;
+}
+
+XMLObject* AbstractXMLObject::getParent() const
+{
+ return m_parent;
+}
+
+void AbstractXMLObject::setParent(XMLObject* parent)
+{
+ m_parent = parent;