[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Copy-of question
Hello, I've a simple problem that I can't resolve, I've this XML and I have reading copy-of documentation but I can't do this: <DETAILS> <LDAYS> <DAY date="10/03/2004" price="70.45"/> <DAY date="11/03/2004" price="90.45"/> <DAY date="12/03/2004" price="90.55"/> </LDAYS> </DETAILS> <DETAILS> ..... </DETAILS> I want to write this with HTML: <TABLE border="0" cellpadding="0" cellspacing="0" height="5px" align="center"> <TR> <TD class="LabelBM" style="width:30px">10/03/2004</TD> <TD class="LabelBM" style="width:30px">11/03/2004</TD> <TD class="LabelBM" style="width:30px">12/03/2004</TD> </TR> <TR> <TD class="LabelBM" style="width:30px">70.45</TD> <TD class="LabelBM" style="width:30px">90.45</TD> <TD class="LabelBM" style="width:30px">90.55</TD> </TR> </TABLE> I do this with XSL: <TABLE border="0" class="DatosHotel" cellpadding="0" cellspacing="0" height="5px" align="center"> <TR> <xsl:for-each select="DETAILS/LDAYS/DAY"> <xsl:variable name="fecha" select="@date"/> <TD class="LabelBM" style="width:30px"><xsl:value-of select="$date"/><xsl:text> </xsl:text></TD> </xsl:for-each> </TR> <TR> <xsl:for-each select="DETAILS/LDAYS/DAY"> <xsl:variable name="preciouni" select="@price"/> <TD class="LabelBM" style="width:30px"><xsl:value-of select="$price"/><xsl:text> €</xsl:text></TD> </xsl:for-each> </TR>--> </TABLE> How I can do this with a copy of and only with a for-each statement? How is more eficient, as my way or with a copy statement? Thanks a lot Frank XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|