|
Subject: RE: [xsl] creating html tables from cells From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 15 Oct 2003 17:18:57 -0400 |
<xsl:key name="ri-types" match="RI" use="@col" />
<xsl:variable name="ri-types" select="/RS/RI[generate-id() =
generate-id(key('ri-types', @col)[1])]/@col" />
<xsl:template match="/RS">
<table>
<xsl:variable name="content" select="RI"/>
<xsl:for-each select="RI [@col='1']">
<tr>
<xsl:for-each select="$ri-types">
<td>
<xsl:value-of select="$content[@col=current()]"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="RS">
<table>
<xsl:for-each select="RI[@col=1]">
<!-- create a row -->
<tr>
<!-- create a cell for this RI -->
<td>
<xsl:apply-templates/>
</td>
<!-- now, create cells for all the RIs that come after this one
but not after another RI[@col=1] -->
<xsl:for-each select="key('RIs-by-first-RI',generate-id())">
<td>
<xsl:apply-templates"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] creating html tables from, Whitney, Dan (CanWes | Thread | [xsl] problem with templates, belangour abdessamad |
| Re: [xsl] counting specific nodes, M. David Peterson | Date | RE: [xsl] creating html tables from, Americo Albuquerque |
| Month |