This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Normalizing string containing entities
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: Normalizing string containing entities
- From: "Pierre-Yves Saumont" <pys at volga dot fr>
- Date: Wed, 19 Jul 2000 16:23:12 +0200
- Reply-To: xsl-list at mulberrytech dot com
Thank you very much for your help. In fact, I need to get one space between
each word where there was at least one space in the document. So :
some <em>text
some <em> text
some<em> text
should all result in :
some <em>text
but :
some<em>text
should not be changed.
I think I can get it to work now.
Thanks again,
Pierre-Yves
-----Message d'origine-----
De : owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]De la part de Wendell Piez
Envoyé : mardi 18 juillet 2000 11:29
À : 'xsl-list@mulberrytech.com'
Objet : Re: Normalizing string containing entities
[cut]
<x>
<para>Some text <em>some other text</em> remaining text</para>
<para>Some text<em> some other text</em> remaining text</para>
<para>Some text <em> some other text</em> remaining
text</para>
<para>Some text <em>some other text </em> remaining text</para>
<para>Some text <em>some other text </em>remaining text</para>
<para> Some text <em>some other text</em> remaining text
</para>
</x>
We get output (using Saxon)
<x>
<para>Some text <em>some other text</em> remaining text</para>
<para>Some text<em>some other text</em> remaining text</para>
<para>Some text <em>some other text</em> remaining text</para>
<para>Some text <em>some other text</em> remaining text</para>
<para>Some text <em>some other text</em>remaining text</para>
<para>Some text <em>some other text</em> remaining text</para>
</x>
If you wanted to get space before the <em> element in the second case or
after in the fifth case, the logic could be extended to catch them (left as
an exercise :-).
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list