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

Re: Easy question, big headache.

Subject: Re: Easy question, big headache.
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 12 Mar 2008 10:42:24 +0000
Re:  Easy question
On 11/03/2008, Patrick Bergeron <pbergeron@xxxxxxxxxxx> 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/

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.