Subject: RE: [xsl] grouping problem From: "SINGH Navpreet" <Navpreet.SINGH@xxxxxxxxx> Date: Wed, 18 Oct 2006 09:01:51 +1000 |
Thanks a lot David. -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: Wednesday, 18 October 2006 8:51 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] grouping problem Could probably be made more efficient but... <xsl:template match="data"> <xsl:variable name="range" select="tokenize(range,',')"/> <xsl:for-each-group select="record" group-by="node/type"> <xsl:value-of select="' ',current-grouping-key(),':',$range[ some $e in current-group() satisfies position() >= index-of($range,$e/start) and position() <= index-of($range,$e/end) ]"/> </xsl:for-each-group> </xsl:template> </xsl:stylesheet> $ saxon8 range.xml range.xsl <?xml version="1.0" encoding="UTF-8"?> type1 : 0 2 4 5 6 7 type2 : 0 7 8 9 A B C D E F David Disclaimer : The contents of this e-mail including any attachments are intended only for the person or entity to which this e-mail is addressed. If you are not, or believe you may not be, the intended recipient, please advise the sender immediately by return e-mail, delete this e-mail and destroy any copies. Tenix does not warrant nor guarantee that this email communication is free from errors, virus, interception or interference.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping problem, David Carlisle | Thread | [xsl] template processing with docu, Richard Lewis |
RE: [xsl] FW: grouping problem, SINGH Navpreet | Date | Re: [xsl] using contains() on multi, David Carlisle |
Month |