[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Does the count() function require access to the wh
Hi, Thanks Mike for confirming my intuition. And thanks to Dimitre for taking my second question to its logical limit (I think) and posing it there. :-) Cheers, Wendell Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^ On Thu, Jan 16, 2014 at 11:20 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote: >> >> For example, your pipeline could collect all //x (streaming) and then >> reverse them (not streaming). >> >> In principle, you would need only the memory for holding //x (or >> rather, copies of //x or pointers to them), not the entire collection >> within which they are found. > > Generally you can't keep a "pointer" to a streamed node, because it's transient. But you can keep a copy. > > So you should be able to do > > reverse(/copy-of(/x)) > > The result of copy-of(//x) is grounded (it doesn't contain any streamed nodes), and that makes it amenable to operations such as reverse(). >> >> >> I also had a related question, back in September. It wasn't answered >> (rare for this list), either because it wasn't clear, or because XML >> Summer School was going on at the time. Or both. > > Or possibly because the streaming design was completely up in the air at that moment because we had just found a major bug. But I think we've still got some issues with multi-phase streaming that need to be sorted out (that is, with reading from a stream of nodes that is itself constructed by the stylesheet), and such use cases need further work: we've got an agenda item to discuss this. >> >> http://xsl-list.markmail.org/thread/pwuzpcvdoi7eam4h >> > Michael Kay > Saxonica
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|