| Subject: Re: [xsl] Controlling tabular layout of a nodeset From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Fri, 25 Jul 2003 18:55:59 +0200 | 
I want to display it as:
> +--------+------------------+ > |property1 - prvalue1 | > +--------+------------------+ > |user_id1|acct_id1, acct_id2|
+--------+------------------+> |user_id2|acct_id1 ... |
+--------+------------------+
Seems like a double grouping problem, first by property, then by user_id. You need a composite key for the inner group. Try something like <xsl:key name="property" match="row" use="property"/> <xsl:key name="user_id" match="row" use=" concat(property,':',user_id)"/>
  <xsl:for-each select="row[generate-id() =
       generate-id(key('property',property)[1])">
    <tr>
      <td><xsl:value-of select="property"/></td>
      <td><xsl:value-of select="prvalue"/></td>
    <tr>
    <xsl:for-each select="key('property',property)[
      generate-id()=generate-id(key('user_id',
         concat(property,':',user_id))[1])">
      <tr>
        <td><xsl:value-of select="user_id"/></td>
        <td>
          <xsl:for-each select="key('user-id',
              concat(property,':',user_id))">
          <xsl:if test="position()!=last()>,</xsl:if>
        </td>
     </tr>
    </xsl:for-each>
  </xsl:for-each>
(caution: untested)| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] Controlling tabular layout of, John Marshall | Thread | Re: [xsl] Controlling tabular layou, Wendell Piez | 
| RE: [xsl] XHTML to PDF, Wendell Piez | Date | Re: [xsl] Convert escaped XML conte, Wendell Piez | 
| Month |