Subject: Re: "Simple" matrix transformation From: Paul Tchistopolskii <paul@xxxxxxx> Date: Sun, 16 Jul 2000 15:07:30 -0700 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes"/> <xsl:template match="/doc/group"> <HTML><BODY> <xsl:variable name="salesp" select="*"/> <TABLE width='100%'> <TR> <TH> corner </TH> <xsl:for-each select="$salesp"> <xsl:sort/> <TH> <xsl:value-of select="@salesperson"/> </TH> </xsl:for-each> </TR> <!-- XSL cookbook required. See page 275 of Michael's book --> <xsl:for-each select="group/item[ not (./@date = preceding::item/@date) ]"> <xsl:sort/> <xsl:variable name="date" select="@date"/> <TR> <TD align='center'> <xsl:value-of select="$date"/> </TD> <xsl:for-each select="$salesp"> <xsl:sort/> <xsl:variable name="sales" select="@salesperson"/> <TD align='center'> <xsl:value-of select="/doc/group/group/item @date = $date and ../@salesperson = $sales ]" /> </TD> </xsl:for-each> </TR> </xsl:for-each> </TABLE> </BODY></HTML> </xsl:template> </xsl:stylesheet> ---- result: <HTML> <BODY> <TABLE width="100%"> <TR> <TH> corner </TH><TH>alex</TH><TH>lynn</TH><TH>terry</TH> </TR> <TR> <TD align="center">1999-07-15</TD><TD align="center">1200</TD><TD align="center">1500</TD><TD align="center">2000</TD> </TR> <TR> <TD align="center">2000-07-15</TD><TD align="center">1000</TD><TD align="center">2000</TD><TD align="center">3000</TD> </TR> </TABLE> </BODY> </HTML> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
"Simple" matrix transformation, Eric E. Cohen | Thread | external parameters like DOS Comman, Jean-Claude Tarby |
RE: "Simple" matrix transformation, Vun Kannon, David | Date | How to use Multi-value Variables?, David_Benua |
Month |