From 4ab38c6b3fa0db56e8e1fcee802b22293f7d0d67 Mon Sep 17 00:00:00 2001 From: cantor Date: Fri, 9 Nov 2007 23:18:28 +0000 Subject: [PATCH] Check for empty strings during marshalling. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@425 de75baf8-a10c-0410-a50a-987c0e22f00f --- xmltooling/base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmltooling/base.h b/xmltooling/base.h index d1c3d23..31e9edf 100644 --- a/xmltooling/base.h +++ b/xmltooling/base.h @@ -877,7 +877,7 @@ * @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); \ } @@ -901,7 +901,7 @@ * @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); \ } @@ -951,7 +951,7 @@ * @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); \ } -- 2.1.4