[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Normalizing string containing entities

Subject: RE: Normalizing string containing entities
From: "Pierre-Yves Saumont" <pys@xxxxxxxx>
Date: Wed, 19 Jul 2000 16:23:12 +0200
RE: Normalizing string containing entities
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@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]De la part de Wendell Piez
Envoyé : mardi 18 juillet 2000 11:29
À : 'xsl-list@xxxxxxxxxxxxxxxx'
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.