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

Re: Breaking up is hard to do.

Subject: Re: Breaking up is hard to do.
From: "Nikolai Grigoriev" <grig@xxxxxxx>
Date: Sun, 20 Feb 2000 13:20:54 +0300
row.create cells
Joel Hughes writes:

>>     I am unable to generate a </tr><tr> in my output.

Steve Muench replies:

>Here's a simple way to do it that works like
>your brain might be thinking. It depends
>on using the:
>
>  <xsl:text disable-output-escaping="yes">

It's a potentially dangerous technique: you can produce a malformed
document as well. I dare suggest the following instead:

<!-- Disable default processing of fields that don't start the row -->
<xsl:template match="field[position() mod $max  != 1]"/>

<!-- Processing of fields that start the row. Create a row -->
<!-- and enumerate fields in the row, than switch the mode -->
<xsl:template match="field[position() mod $max = 1]">
   <tr>
      <xsl:for-each select="self::field |
                             following-sibling::field[position() < $max]>
         <xsl:apply-templates mode="create-cell"/>
      </xsl:for-each>
   </tr>
</xsl:template>

<!-- Place all real processing for field cell here -->
<xsl:template match="field" mode="create-cell">
   <td><xsl:apply-templates/></td>
</xsl:template>

Regards,
Nikolai



 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.