|
Subject: Re: [xsl] Hopefully not a terribly silly question From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 03 Jan 2002 13:42:17 -0500 |
I am trying to iterate through each of the rows, then each of the columns. If I am not in the first column then I want to get a hold of the name attribute from the first row and apply it....
Unfortunately, I get a the literal string result of the concat() function, instead of the actual data value. Is there some sort of eval() function that I need to use? Am I approaching this incorrectly?
So: <xsl:key name="named-columns" match="/result/row[1]/column" use="position()"/>
<xsl:template name="print_name">
<xsl:choose>
<xsl:when test="@name">
Name = <xsl:value-of select="@name"/>
</xsl:when>
<xsl:otherwise>
Name <xsl:value-of select="position()"/>= <xsl:value-of select="key('named-columns', position())/@name"/>
<!-- this retrieves the @name attribute from the corresponding
named column --> Value <xsl:value-of select="position()"/>=
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>Cheers, Wendell
"For every complex problem, there is a solution that is simple, neat, and wrong."
-- H.L. Mencken (1880-1956)
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Hopefully not a terribly , Francis Norton | Thread | Re: [xsl] Hopefully not a terribly , Trevor Nash |
| Re: [xsl] Re: XPath incompatibiliti, Jeni Tennison | Date | Re: [xsl] unique elements from diff, Jeni Tennison |
| Month |