This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Acheiving ..2nd level grouping but with different node structure ..


Hi Kumar,

> Thank you so much for the solution while i was away.... I think
> there is one more problem in this ..correct me if i am wrong .. It
> can only pull data from a <uwr> nodeset only and not from <arr> .

At the point where you're having problems:

  <xsl:for-each
    select="key('distinct-region', @reg)
              [generate-id() =
               generate-id(key('distinct-reg-user',
                               concat(@userid, '+', @reg)))]">
    <tr>
      <!-- So From here how do i get same 'users' from <ARR> which
           is a sibling of this   -->
    </tr>
  </xsl:for-each>

the current node is a los element within the <uwr> element. Presumably
you want to get hold of the los element within <arr> element that has
the same userid and reg as the los element that you're currently on.

To do that, use the 'distinct-reg-user' key -- it will return both the
los elements with the same userid and reg, the first from <uwr> and
the second from <arr>, and you can create the pair of cells for each
of them:

  <xsl:for-each select="key('distinct-reg-user',
                            concat(@userid, '+', @reg))">
    <td> <xsl:value-of select="review[@type='N']"/></td>
    <td> <xsl:value-of select="review[@type='Y']"/></td>
  </xsl:for-each>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]