Re: [xsl] <br> in with-param

Subject: Re: [xsl] <br> in with-param
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 18 Feb 2002 11:44:28 +0000
Hi Ilyasov,

> how can put <br>s?

You're putting in the <br>s fine to the result tree fragment held by
the $summary parameter, but they you access its *value* rather than
*copying* the result tree fragment. When you get the value of the
result tree fragment, you get all the text, but none of the structure,
such that the <br> elements are omitted.

If you change your day template to use xsl:copy-of rather than
xsl:value-of, then it should work OK:

<xsl:template name="day">
  <xsl:param name="day"/>
  <xsl:param name="summary"/>
  <tr>
   <td>
    <xsl:value-of select="$day"/>
   </td>
   <td>
    <xsl:copy-of select="$summary"/><br/>
   </td>
  </tr>
  ...
</xsl:template>

By the way, a match pattern that looks like "//start" has exactly the
same effect as having a match pattern that looks like "start". With
the former, you're just telling the processor to check that the start
element is a descendant of the root node; all elements must be
descendants of the root node by definition, so the two match patterns
are exactly the same.

You also might be interested in trying out the Muenchian Method for
doing your grouping; details are available at
http://www.jenitennison.com/xslt/grouping or in any good XSLT book.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread