xsl-list
[Top] [All Lists]

Re: Splitting already-grouped output into two parts

2005-12-28 12:54:56
I know I am coming in late here but why arent you using
<xsl:for-each-group>  ?



Tom Maciejewski
Société Générale
Information Technology
1221 Avenue of the Americas
New York, NY 10020
Tel. (212) 278-7103
Cell. (917) 690-9541


|---------+---------------------------->
|         |           Joseph Dane      |
|         |           <jdane(_at_)hawaii(_dot_)edu|
|         |           >                |
|         |                            |
|         |           12/28/2005 02:14 |
|         |           PM               |
|         |           Please respond to|
|         |           xsl-list         |
|         |                            |
|---------+---------------------------->
  
------------------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                                 |
  |       To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com            
                                                                  |
  |       cc:                                                                   
                                                 |
  |       Subject:  Re: [xsl] Splitting already-grouped output into two parts   
                                                 |
  
------------------------------------------------------------------------------------------------------------------------------|





I have run into a similar problem.  My solution, such as it was, was
to essentially run multiple passes over the data.  Something like

  <xsl:variable name='records'>
    <xsl:for-each ...>
      <record .../>
    </xsl:for-each>
  </xsl:variable>

  <h1>First Half</h1>
  <div>
    <ul>
      <xsl:for-each select='xxx:nodeset($records)/record[position() &lt;
(count(xxx:nodeset($records)) div 2)]'>
        <li> ... </li>
      </xsl:for-each>
    </ul>
  </div>

Something like that, ignoring typos and other bugs.  You'll need to
use a nodeset extension (I'm using Xalan) since you're apparently
using XSLT1.

--

joe

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



*************************************************************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates 
shall be liable for the message if altered, changed or falsified. 

*************************************************************************

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--