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

RE: Vertical display

Subject: RE: Vertical display
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 28 Apr 2003 07:13:37 -0700 (PDT)
edt display
> How this link solves the current problem?
>
> thanks,
> sundar
> 
> -----Original Message-----
> From: Dimitre Novatchev [mailto:dnovatchev@xxxxxxxxx]
> Sent: Monday, April 28, 2003 5:50 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Vertical display 
> 
> See:
> 
> http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&oe=UTF-
> 8&selm=b8ftqh%
> 249iaui%241%40ID-152440.news.dfncis.de&rnum=4


By providing a generic templates that produce a column-first HTML table
from the nodes of a node-set. The node-set and the desired number of
columns are provided as parameters.

In your case you will call this template like this:

  <xsl:variable name="numCols" select="count(/o/com/*[1]/*)" />

  <xsl:template match="/">
    <table>
      <xsl:apply-templates mode="multiColumn"
       select="(/o/com/*/*)[position() &lt;= $numCols]">
        <xsl:with-param name="numCols" select="$numCols" />
        <xsl:with-param name="nodes" select="/o/com/*/*" />

       </xsl:apply-templates>
    </table>
  </xsl:template>

This produces the wanted result:

<table>
  <tr>
    <td>1</td>
    <td>4</td>
    <td>41</td>
    <td>42</td>
  </tr>
  <tr>
    <td>2</td>
    <td>5</td>
    <td>51</td>
    <td>52</td>
  </tr>
  <tr>
    <td>3</td>
    <td>6</td>
    <td>61</td>
    <td>62</td>
  </tr>
</table>





=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.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.