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

Re: How to split text element to separate spans?

Subject: Re: How to split text element to separate spans?
From: Mark Howe <mark@xxxxxxxxxxxxxx>
Date: Mon, 07 Jun 2010 09:18:46 +0200
 Re: How to split text element to separate spans?
Israel Viente wrote:

> I have a problem splitting spans with text elements separated by br,
> to different spans with br in between them.

I'm not sure I've caught all the details, but my approach in general to
this sort of problem is to move through the document recursively. In
other words, I'd write a template that looks for the first item to be
wrapped in a span. If it finds it, it wraps that first item in a span
and then calls itself recursively on the rest of the document. If it
doesn't find it, it returns the original content. You can do this using
functions or named templates.

This if fine and even elegant for relatively small data sets, but it
starts to fill up the stack for large data sets, so if anyone has a
non-recursive solution I'd be interested in seeing it.

Current Thread


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.
First Name
Last Name
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.