}\r
\r
/**\r
+ * Implements get/set methods and a private member for a string XML attribute,\r
+ * plus a getXMLID override and attribute node clearance when DOM is dropped.\r
+ *\r
+ * @param proper the proper name of the attribute\r
+ * @param ucase the upcased name of the attribute\r
+ * @param namespaceURI the XML namespace of the attribute\r
+ */\r
+#define IMPL_ID_ATTRIB_EX(proper, ucase, namespaceURI) \\r
+ IMPL_XMLOBJECT_ATTRIB(proper,XMLCh) \\r
+ const XMLCh* getXMLID() const { \\r
+ return m_##proper; \\r
+ } \\r
+ void releaseDOM() const { \\r
+ if (getDOM()) \\r
+ getDOM()->removeAttributeNS(namespaceURI, ucase##_ATTRIB_NAME); \\r
+ AbstractDOMCachingXMLObject::releaseDOM(); \\r
+ }\r
+\r
+/**\r
* Implements get/set methods and a private member for a DateTime XML attribute.\r
*\r
* @param proper the proper name of the attribute\r
/**
* EncryptionImpl.cpp
*
- * Implementation classes for XML Encryption schema
+ * Implementation classes for XML Encryption schema.
*/
#include "internal.h"
}
IMPL_XMLOBJECT_CLONE(EncryptionProperty);
- IMPL_ID_ATTRIB(Id);
+ IMPL_ID_ATTRIB_EX(Id,ID,NULL);
IMPL_STRING_ATTRIB(Target);
IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end());
}
IMPL_XMLOBJECT_CLONE(EncryptionProperties);
- IMPL_ID_ATTRIB(Id);
+ IMPL_ID_ATTRIB_EX(Id,ID,NULL);
IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end());
protected:
}
IMPL_XMLOBJECT_CLONE(EncryptedType);
- IMPL_ID_ATTRIB(Id);
+ IMPL_ID_ATTRIB_EX(Id,ID,NULL);
IMPL_STRING_ATTRIB(Type);
IMPL_STRING_ATTRIB(MimeType);
IMPL_STRING_ATTRIB(Encoding);
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* KeyInfoImpl.cpp
*
- * Implementation classes for KeyInfo schema
+ * Implementation classes for KeyInfo schema.
*/
#include "internal.h"
}
IMPL_XMLOBJECT_CLONE(KeyInfo);
- IMPL_ID_ATTRIB(Id);
+ IMPL_ID_ATTRIB_EX(Id,ID,NULL);
IMPL_TYPED_CHILDREN(KeyName,m_children.end());
IMPL_TYPED_CHILDREN(KeyValue,m_children.end());
IMPL_TYPED_CHILDREN(RetrievalMethod,m_children.end());