This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
<br> in with-param
- From: "Ilyasov Jienbay" <jienbay at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 18 Feb 2002 11:18:05 +0000
- Subject: [xsl] <br> in with-param
- Reply-to: xsl-list at lists dot mulberrytech dot com
hello,
it is jian again with stupid questions.
please, help. i have xml like this:
<item>
<start>20011019T140000</start>
<summary>summary</summary>
</item>
<item>
<start>20011019T140001</start>
<summary>summary2</summary>
</item>
<item>
<start>20011020T140002</start>
<summary>summary3</summary>
</item>
<item>
<start>20011020T140003</start>
<summary>summary4</summary>
</item>
and i tried to make
_____________________
|summary1<br>
day 19 |summary2<br>
___________|___________
|summary3<br>
day 20 |summary4<br>
___________|___________
but what i get is
_____________________
|summary1 summary2
day 19 |
___________|___________
|summary3 summary4
day 20 |
___________|___________
how can put <br>s?
thanks
jian
PS.if you have time you can check my xsl bellow for more details on what
i've been trying to do:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" version="4.01" encoding="UTF-8" />
<xsl:param name="para" select="17"/>
<xsl:template match="/">
<html>
<body>
<table border="1">
<xsl:apply-templates select="AirCal"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="AirCal">
<xsl:call-template name="day">
<xsl:with-param name="day" select="$para"/>
<xsl:with-param name="summary">
<xsl:apply-templates select="//start" mode="a"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="day">
<xsl:param name="day"/>
<xsl:param name="summary"/>
<tr>
<td>
<xsl:value-of select="$day"/>
</td>
<td>
<xsl:value-of select="$summary"/><br/>
</td>
</tr>
<xsl:if test="$day<$para+6">
<xsl:call-template name="day">
<xsl:with-param name="day" select="$day+1"/>
<xsl:with-param name="summary">
<xsl:apply-templates select="//start">
<xsl:with-param name="dday" select="$day"/>
</xsl:apply-templates>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="//start" mode="a">
<xsl:if test="substring(.,7,2)=$para">
<xsl:value-of select="following-sibling::summary"/><br/>
</xsl:if>
</xsl:template>
<xsl:template match="//start">
<xsl:param name="dday"/>
<xsl:if test="substring(.,7,2)=$dday+1">
<xsl:value-of select="following-sibling::summary"/><br/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list