Multi-line svn commit, see body.
[shibboleth/cpp-xmltooling.git] / xmltooling / AbstractXMLObject.h
index aa962e1..7767167 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright 2001-2006 Internet2
+*  Copyright 2001-2007 Internet2
  * 
 * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file AbstractXMLObject.h
+ * @file xmltooling/AbstractXMLObject.h
  * 
  * An abstract implementation of XMLObject.
  */
 #ifndef __xmltooling_abstractxmlobj_h__
 #define __xmltooling_abstractxmlobj_h__
 
+#include <xmltooling/logging.h>
 #include <xmltooling/XMLObject.h>
 #include <xmltooling/util/DateTime.h>
 
-#include <log4cpp/Category.hh>
-
 #if defined (_MSC_VER)
     #pragma warning( push )
     #pragma warning( disable : 4250 4251 )
@@ -47,7 +46,8 @@ namespace xmltooling {
     public:
         virtual ~AbstractXMLObject() {
             delete m_typeQname;
-            XMLString::release(&m_schemaLocation);
+            xercesc::XMLString::release(&m_schemaLocation);
+            xercesc::XMLString::release(&m_noNamespaceSchemaLocation);
         }
 
         void detach();
@@ -79,7 +79,18 @@ namespace xmltooling {
         const XMLCh* getXMLID() const {
             return NULL;
         }
-    
+        
+        xmlconstants::xmltooling_bool_t getNil() const {
+               return m_nil;
+        }
+        
+        void nil(xmlconstants::xmltooling_bool_t value) {
+            if (m_nil != value) {
+               releaseThisandParentDOM();
+               m_nil = value;
+            }
+        }
+
         bool hasParent() const {
             return m_parent != NULL;
         }
@@ -194,13 +205,23 @@ namespace xmltooling {
         /**
          * Logging object.
          */
-        log4cpp::Category& m_log;
+        logging::Category& m_log;
 
         /**
          * Stores off xsi:schemaLocation attribute.
          */
         XMLCh* m_schemaLocation;
 
+        /**
+         * Stores off xsi:noNamespaceSchemaLocation attribute.
+         */
+        XMLCh* m_noNamespaceSchemaLocation;
+        
+        /**
+         * Stores off xsi:nil attribute.
+         */
+        xmlconstants::xmltooling_bool_t m_nil;
+
     private:
         XMLObject* m_parent;
         QName m_elementQname;