|
Subject: [xsl] Copy-of question From: "Fran" <franciscojose@xxxxxxxxxxx> Date: Tue, 20 Jan 2004 09:54:55 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Testing if attribute node, G. Ken Holman | Thread | RE: [xsl] Copy-of question, Jarno . Elovirta |
| RE: [xsl] Exsl functions in xslt 2, Andrew Welch | Date | RE: [xsl] Copy-of question, Jarno . Elovirta |
| Month |