From: cantor Date: Fri, 9 Nov 2007 23:18:28 +0000 (+0000) Subject: Check for empty strings during marshalling. X-Git-Tag: 1.4.1~401 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=4ab38c6b3fa0db56e8e1fcee802b22293f7d0d67 Check for empty strings during marshalling. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@425 de75baf8-a10c-0410-a50a-987c0e22f00f --- 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); \ }