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

Re: Selecting and sorting attributes from dynamic head

Subject: Re: Selecting and sorting attributes from dynamic headers...
From: gutman@xxxxxxxxxxxxxxx
Date: Tue, 7 Aug 2001 19:25:21 +0700
sorting .att
Hello.

MARTZEL Xavier wrote:
> My XML file is:
> 
> <XmlData>
>       <Headers>
>               <Column label="att1" />
>               <Column label="att4" />
>               <Column label="att2" />
>               <Column label="att7" />
>       </Headers>
>       <Results>
>               <Row att1="AAA" att2="BBB" att3="CRC" ... att10="NNN" />
>               <Row att1="AAA" att2="BAB" att3="CCT" ... att10="NNN" />
>               <Row att1="AAA" att2="BCB" att3="CEC" ... att10="NNN" />
>               <Row att1="AAA" att2="DBB" att3="CCR" ... att10="NNN" />
>               <Row att1="AAA" att2="BBE" att3="CCC" ... att10="NNN" />
>       </Results>
> </XmlData>
> 
> The Headers node is a param of my XSL file.

I do not understand this.
Do you pass a node itself (a node's singleton) as a parameter,
or just the name of a node? Anyway, I ignore this statement.
(Please provide some more information if this is important.)

> I'd like to generate a HTML
> table with the attributes specified in the Headers node in the same 
order of
> the Column nodes. I thought it was simple, but I can't to it !!

I am almost sure that I did not understand your problem, but...

  <xsl:template match="anything">
    <table>
      <tr>
        <xsl:for-each select="/XmlData/Headers/Column">
          <td><xsl:value-of select="@label"/></td>
        </xsl:for-each>
        <!-- other rows go here -->
      </tr>
    </table>
  </xsl:template>

Is this what you need?

-- 
Alexander E. Gutman

 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.