You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jon Smirl <jo...@mediaone.net> on 2000/06/20 05:23:50 UTC

Xalan-C: Empty strings

How can I use XalanDOMString to make an empty string "" instead of NULL.

If I do this:
XalanDOMString foo = "";
char *p = c_wstr(foo);

p is NULL, not a pointer to an empty string.  It doesn't look like
XalanDOMString differentiates between NULL and "".

This breaks in addAttribute() when I'm trying to set the value to an empty
string.

bool
AttributeListImpl::addAttribute(
   const XMLCh* name,
   const XMLCh* type,
   const XMLCh* value)
{
#if !defined(XALAN_NO_NAMESPACES)
 using std::auto_ptr;
#endif

 assert(name != 0);
 assert(type != 0);
 assert(value != 0);




Jon Smirl
jonsmirl@mediaone.net