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

Re: nested for-each to create a html table

Subject: Re: nested for-each to create a html table
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 19 May 2005 13:21:21 +0000
asp nested select
Santosh,

I am currently using this method, but wanted to loop through Columns
node as i need to get other informations like dataType,colSelected
etc.. i will be using these to format the column.

> ... If you want to be more specific about "columns"
> printed, use
> position() in the inner loop to relate to @id in the metadata.
>
> There was another post today (by Martie ...) about just this issue
> of
> matching row data with its metadata.

<xsl:template match="/">
<xsl:for-each select="Results/Rows/Row">
<xsl:for-each select="*">
<xsl:variable name="pos" select="position()"/>
<xsl:variable name="meta-col" select="/Results/Columns/Column[@indx = $pos - 1]"/>
<xsl:value-of select="concat($meta-col/colName, ':')"/>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>&#xa;</xsl:text>
</xsl:for-each>
</xsl:template>


Regards,

--A

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee. Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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.