Check for empty strings during marshalling.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 9 Nov 2007 23:18:28 +0000 (23:18 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 9 Nov 2007 23:18:28 +0000 (23:18 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@425 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/base.h

index d1c3d23..31e9edf 100644 (file)
  * @param namespaceURI  the XML namespace of the attribute
  */
 #define MARSHALL_STRING_ATTRIB(proper,ucase,namespaceURI) \
-    if (m_##proper) { \
+    if (m_##proper && *m_##proper) { \
         domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \
     }
 
  * @param namespaceURI  the XML namespace of the attribute
  */
 #define MARSHALL_INTEGER_ATTRIB(proper,ucase,namespaceURI) \
-    if (m_##proper) { \
+    if (m_##proper && *m_##proper) { \
         domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \
     }
 
  * @param namespaceURI  the XML namespace of the attribute
  */
 #define MARSHALL_ID_ATTRIB(proper,ucase,namespaceURI) \
-    if (m_##proper) { \
+    if (m_##proper && *m_##proper) { \
         domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \
         domElement->setIdAttributeNS(namespaceURI, ucase##_ATTRIB_NAME); \
     }