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

How to split text element to separate spans?

Subject: How to split text element to separate spans?
From: Israel Viente <israel.viente@xxxxxxxxx>
Date: Sun, 6 Jun 2010 18:42:25 +0300
 How to split text element to separate spans?
Hi,
I have a problem splitting spans with text elements separated by br,
to different spans with br in between them.

Example Input:

<p dir="ltr"><span class="smaller">text1
            <br />
             text2
            text3.
            <br />
            </span> <span class="smalleritalic">no</span> <span
class="smaller">problems.
            <br />


            <br />
            </span></p>

Desired output:

<p dir="ltr"><span class="smaller">text1</span>
            <br />
             <span class="smaller">text2 text3.</span>
            <br />
            <span class="smalleritalic">no</span> <span
class="smaller">problems.</span>
            <br />
            <br />
            </p>
 Note: I need to create new span and preserve the span class when br
breaks inside a span.

Thanks for any idea.
Israel

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.