Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: How to convert table from column to row order? [Thread Next] Re: How to convert table from column to row order?To: NULL Date: 8/16/2006 7:55:00 AM
"Neil Smith [MVP Digital Media]" <neil@n...> wrote in message
news:hlk1e2lpapv02sh763pr0f6nrco8g3f35j@4......
> On Mon, 14 Aug 2006 10:22:09 -0500, "LJB" <.> wrote:
>
>>I've discovered answers to both my questions. Its amazing what a weekend
>>away from the office can do!
>
> If only we knew what those answers were, others would benefit from
> your moment of clarity !
>
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2006
> http://mvp.support.microsoft.com/mvpfaqs
My XSL ended up looking like the following. I ended up using call-templates
with parameters. Perhaps there is a better way.
------------------xsl------------------
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//Drawing[position() mod 4 = 1]">
<TR>
<xsl:call-template name="TableCell">
<xsl:with-param name="Detail"
select="."/>
</xsl:call-template>
<xsl:call-template name="TableCell">
<xsl:with-param name="Detail"
select="following-sibling::Drawing[1]"/>
</xsl:call-template>
<xsl:call-template name="TableCell">
<xsl:with-param name="Detail"
select="following-sibling::Drawing[2]"/>
</xsl:call-template>
<xsl:call-template name="TableCell">
<xsl:with-param name="Detail"
select="following-sibling::Drawing[3]"/>
</xsl:call-template>
</TR>
</xsl:for-each>
</TABLE>
</xsl:template>
<xsl:template name="TableCell">
<xsl:param name="Detail"/>
<TD>
<xsl:choose>
<xsl:when test="$Detail">
<xsl:value-of select="$Detail/Number"/> - <xsl:value-of
select="$Detail/Title"/>
</xsl:when>
<xsl:otherwise>
 
</xsl:otherwise>
</xsl:choose>
</TD>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
