[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: <br> in with-param

Subject: Re: <br> in with-param
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 18 Feb 2002 11:44:28 +0000
Re:  <br> in with-param
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.