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

RE: Close but a little off

Subject: RE: Close but a little off
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Wed, 16 Apr 2003 11:07:25 -0700
raj but
May be something like this, If I understand you...

		<xsl:variable name="my_name" select="@name" />
		<td><xsl:value-of select="@name"/></td>
     <td><xsl:value-of
select="/xml/rs:data/z:row[@name=$my_name]"/>&nbsp;</td>

The above one matches (prints) all the rows that has name attribute with
same value as name that has been selected in for-each.

Thanks,
Raj...


-----Original Message-----
From: Karl J. Stubsjoen [mailto:karl@xxxxxxxxxxxxx]
Sent: Wednesday, April 16, 2003 10:26 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Close but a little off


Hello,
I'm close, but just a little off and am not sure how to refer to the parent
(think its considered parent) xpath.
I have the following template:

<xsl:template match="xml/rs:data/z:row">
<table border="1">
 <xsl:for-each select="//xml/s:Schema/s:ElementType/s:AttributeType">
    <tr>
     <td><xsl:value-of select="@name"/></td>
     <td><xsl:value-of select="/xml/rs:data/z:row/@name"/>&nbsp;</td>
    </tr>
    </xsl:for-each>
</table>
</xsl:template>

In english, this translates to:
For each row loop throught the s:AttributeType node.  This node contains the
name of the attribute for the field, the size of the element, etc... I need
to return the name of the attribute and then use this name to match the
attribute in the original match "xml/rs:data/z:row".
I'm close... in my 2nd xsl:value-of, I'm not sure how to refer to the values
from the original match and not values which are coming from the for-each
loop.
Hope that makes sense.
Thanks,
Karl


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 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.