xsl-list
[Top] [All Lists]

Re: [xsl] Easy question, big headache.

2008-03-12 03:42:53
On 11/03/2008, Patrick Bergeron <pbergeron(_at_)innobec(_dot_)com> wrote:
 I had left the question open in case
 someone could post an easy solution which, GASP!, would have found a
 creative way to create and update a variable (or even a node element!), but
 I guess that's just not going to happen.

You're asking a lot from posting a wordy question.

You can't update a variable, so your two choices are:

- Use two passes, the first pass does the filtering the second pass
adds the marker

- Use one pass and output the marker as you do the filtering

The former is the correct approach when the filtering is complex for
all the usual reasons - maintainability, testability, simplicity etc

You could do the first approach and discover its just fine.  If
however the memory required for the extra pass is deemed too much,
then you can do the second approach.  It's harder but still perfectly
possible.  Until you post some code then really that's all that can be
said.

Ultimately though, if possible you should switch to Saxon and use 2.0
- it's tiny tree will use less memory, and then within the transform
you can atomic values instead of nodes, saving more memory, and take
advantage of 2.0 features that may mean you don't need to build
temporary trees at all.

You probably will GASP! at how 1 line of 2.0 can do the job of 10
lines of XSLT 1.0


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>