Subject: Re: display in a recursive way From: Paul Tchistopolskii <paul@xxxxxxx> Date: Tue, 25 Apr 2000 21:46:28 -0700 |
> Attached please find the changed stylesheet and the result > of rendering with XT. Beware - I don't know what will happen > with the latest MS XSL version - my current (old) version of MSIE > says that: > > "Keyword xsl:call-template may not be used here." I simplified the stylesheet one more time, it is not not using call-template, and still works with XT, but not with ( old ) MS IE. Now MS IE is not happy with following-sibling:: " Expected token 'eof' found ':'. following-sibling-->:<--:itemdesc " I give up. Rgds.Paul.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="purchase_order"> <html> <head> <title>Purchase Order Demo</title> </head> <body> <table border="2" ALIGN="LEFT" > <xsl:apply-templates/> </table> </body> </html> </xsl:template> <xsl:template match="data"> <tr width="100"> <th COLSPAN="2"><font face="ARIAL" size="1"> <small>SUPPLIER </small></font></th> <th COLSPAN="1"><font face="ARIAL" size="1"> <small>SHIP TO </small></font></th> <th COLSPAN="3"><font face="ARIAL" size="1"> <small>ORDER NUMBER </small></font></th> </tr> <tr> <td COLSPAN="2" ROWSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"> <small><xsl:value-of select="id_supplier"/></small> <small><xsl:value-of select="suplier"/></small></font> </td> <td COLSPAN="1" ROWSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="ship_to"/> </small></font></td> <td COLSPAN="3" ROWSPAN="5" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="order_number"/> </small></font></td> </tr> <tr> <th COLSPAN="2"><font face="ARIAL" size="1"> <small> CONTACT </small></font> </th> <th COLSPAN="1"><font face="ARIAL" size="1"> <small> BILL TO </small></font> </th> </tr> <tr> <td COLSPAN="2" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="contact"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="bill_to"/> </small></font></td> </tr> <tr> <th COLSPAN="2"><font face="ARIAL" size="1"> <small> TELEPHONE </small></font></th> <th COLSPAN="1"><font face="ARIAL" size="1"> <small> FAX </small></font></th> </tr> <tr> <td COLSPAN="2" ALIGN="CENTER"><font face="ARIAL" size="1"><small><xsl:value-of select="telcontact"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small><xsl:value-of select="faxcontact"/> </small></font></td> </tr> <tr> <th COLSPAN="1"><font face="ARIAL" size="1"> <small> DATE </small></font></th> <th COLSPAN="1"><font face="ARIAL" size="1"> <small> SHIP VIA </small></font></th> <th COLSPAN="1"><font face="ARIAL" size="1"> <small> FREE ABOARD </small></font> </th> <th COLSPAN="2"><font face="ARIAL" size="1"> <small> TERMS</small></font></th> <th COLSPAN="2"><font face="ARIAL" size="1"> <small> INSTRUCTIONS</small></font></th> </tr> <tr> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="date"/> </small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="ship_via"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="free"/></small></font></td> <td COLSPAN="2" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="terms"/></small></font></td> <td COLSPAN="2" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="instructions"/></small></font></td> </tr> <tr> <th COLSPAN="2"><font face="ARIAL" size="1"><small> BUYER </small></font> </th> <th COLSPAN="1"><font face="ARIAL" size="1"><small> BUYER TELEPHONE </small></font> </th> </tr> <tr> <td COLSPAN="2" ALIGN="CENTER"><font face="ARIAL" size="1"> <small> <xsl:value-of select="buyer"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"> <small> <xsl:value-of select="telcomp"/></small></font></td> </tr> </xsl:template> <xsl:template match="detail"> <xsl:apply-templates select="item"/> </xsl:template> <xsl:template match="item"> <tr width="100"> <th COLSPAN="1" ALIGN="CENTER" BGCOLOR="ORANGE"><font face="ARIAL" size="1"> <small>ITEM</small></font> </th> <th COLSPAN="1" ALIGN="CENTER" BGCOLOR="ORANGE"><font face="ARIAL" size="1"> <small>DELIVER DATE </small></font> </th> <th COLSPAN="1" ALIGN="CENTER" BGCOLOR="ORANGE"><font face="ARIAL" size="1"> <small>QUANTITY</small></font> </th> <th COLSPAN="1" ALIGN="CENTER" BGCOLOR="ORANGE"><font face="ARIAL" size="1"> <small>U.M</small></font> </th> <th ALIGN="CENTER" BGCOLOR="ORANGE"><font face="ARIAL" size="1"> <small>PRICE </small></font></th> <th BGCOLOR="ORANGE"> <small><font face="ARIAL" size="1">AMOUNT </font> </small></th> </tr> <tr> <td COLSPAN="1" ALIGN="CENTER" ><font face="ARIAL" size="1"><small> <xsl:value-of select="text()"/> <xsl:value-of select="following-sibling::itemdesc"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="following-sibling::date_detail"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="following-sibling::quantity"/></small></font></td> <td COLSPAN="1" ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="following-sibling::type"/></small></font></td> <td ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="following-sibling::price"/></small></font></td> <td ALIGN="CENTER"><font face="ARIAL" size="1"><small> <xsl:value-of select="following-sibling::amount"/></small></font></td> </tr> </xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: display in a recursive way, Paul Tchistopolskii | Thread | RE: display in a recursive way, Paulo Gaspar |
Re: Displaying every 2 element valu, Noah Nordrum | Date | Re: display in a recursive way, Mike Brown |
Month |