Normalizing string containing entities

Subject: Normalizing string containing entities
From: "Pierre-Yves Saumont" <pys@xxxxxxxx>
Date: Fri, 14 Jul 2000 12:50:59 +0200
Does anyone know a simple way to normalise strings containing entities and
subelement ?

Using normalize-space on a string containing entities or subelements will
strip the spaces before and after every entities/elements.

Consider, for example, the following:

<para>Some    text    <em>some    other   text</em>   remaining  text</para>

How can I normalize this into :

<p>Some text <i>some other text</i> remaining text</p>

The answer I found in several books is that we should not have elements
mixing CDATA and subelements. If we apply this rule, it is impossible to
represent the real structure of text.

Any idea ?

Pierre-Yves


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread