[XML-SIG] sax and entities

Uche Ogbuji uche.ogbuji@fourthought.com
Thu, 08 Feb 2001 10:41:26 -0700


> If you really want to have it as an ' ' in your output XML rather
> than as an NBSP character you should do something like
> 
>   string.replace(text, "\240", " ")
> 
> when you write the DOM tree out.  Exactly how to do this will depend
> on your DOM implementation.
> 
> 
> I think it would make very good sense, BTW, for the DOM serializers to
> provide some mechanism for doing escapings of this kind when
> serializing the DOM.  It might be that you pass a dictionary like
> 
>   {"\240" : " "}
> 
> or perhaps a function. What say ye, DOM implementors?

4DOM and 4XSLT already automatically do this for HTML output.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python