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/16 04:10:28 UTC

Xalan-C: DOMStringHelper.cpp

I keep triggering this assert. When I looked at the source for DOMString in
Xerces there is no requirement that the string be null terminated and doc
specifically says this may not be true if multiple strings are overlaid on
each other.

In my case I'm using append(XMLCh) which causes the DOMString to grow and
the length is adjusted, it then triggers this assert.

From
DOMStringHelper.cpp ----------------------------------------------------
/**
 * Get the underlying representation of the target XalanDOMString as a
 * null-terminated string
 *
 * @param theString target string
 * @return null-terminated string of XalanDOMChar
 */
inline const XalanDOMChar*
c_wstr(const XalanDOMString& theString)
{
 const XalanDOMChar* const ptr = theString.rawBuffer();

 assert(!ptr || ptr[theString.length()] == '\0');

 return ptr;
}


Jon Smirl
jonsmirl@mediaone.net