Subject: Re: searching for closest previous element From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx> Date: Thu, 19 Mar 1998 10:31:40 -0500 |
stephenng@xxxxxxxxxxxx wrote: > > "Reverse" takes a lot of time with many elements. Is that "reverse" or "node-list-reverse"? The first will almost certainly be implemented eagerly, and thus process the whole list before it starts it work. The latter may be implemented lazily. But there seems no > way around it: there's no quick way to access the last node in a node > list, so that I can walk the tree list backwards. I think what you want is (node-list-last (select-element (tree-before (current-node)) "FOO")) Only Jade doesn't seem to support either node-list-last or tree-before. Still, this is interesting to show you how it would be done "in principle" in DSSSL and to demonstrate that side effects are still not really necessary. There are various ways this could be optimized in an implementation. Paul Prescod - http://itrc.uwaterloo.ca/~papresco "You have the wrong number." "Eh? Isn't that the Odeon?" "No, this is the Great Theater of Life. Admission is free, but the taxation is mortal. You come when you can, and leave when you must. The show is continuous. Good-night." -- Robertson Davies, "The Cunning Man" DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: searching for closest previous , Norman Walsh | Thread | Re: searching for closest previous , stephenng |
Re: Bold and Formatting within a Ta, Norman Walsh | Date | Re: modular docbook stylesheets spe, Chris Maden |
Month |