Subject: Re: [xsl] Easy question, big headache. From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Wed, 12 Mar 2008 10:42:24 +0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Easy question, big headac, Colin Adams | Thread | [xsl] Processing on both a document, Mark Peters |
Re: [xsl] Easy question, big headac, Colin Adams | Date | [xsl] [XSLT] Asking or Update varia, igutierrez027 |
Month |