Subject: Re: [xsl] for-each-group and result-document splitting to less files. From: "James Cummings" <cummings.james@xxxxxxxxx> Date: Wed, 10 Sep 2008 18:02:46 +0100 |
On Mon, Sep 8, 2008 at 23:25, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote: > James, > > If this were my code, I'd be sorely tempted to encapsulate the logic in a > function, if only to make it more legible and maintainable. This would also > provide you a nice neat place to document it and its rationale. A good suggestion. I'm trying to do that more and more. (Though if I've asked a question I always like to send out a copy of what I chose in case anyone else later reads the thread. And once or twice that later person has turned out to be me!) > Something like: function snipped -- though makes me curious... how hard would it be to change this so that the groupings were based on the count() of items in the nodeset? i.e. make divisions that were basically equal regardless of the input? So if there were almost no entries in the first half of the alphabet, the first division would be a-r, then s-t (if a lot there), then u-w (if few there), etc. maybe passing how many sets to split it into total? > BTW, why the double-escaping of '&amp;'? I can't see how that would do > anything for you. The processor will see only the string '& a m p ;' here, > which translate() will decompose into characters. I have no idea how that ended up like that in my post, it isn't like that in my actual XSLT.... weird. Unless I mistyped it and then corrected it after pasting, or pasting into gmail did something weird. More likely the former. -James
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] for-each-group and result, Wendell Piez | Thread | RE: [xsl] for-each-group and result, Michael Kay |
Re: [xsl] xmlXPathCompOpEval: funct, Mukul Gandhi | Date | RE: [xsl] for-each-group and result, Michael Kay |
Month |