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

Nested/embedded/self-referential path expressions.

Subject: Nested/embedded/self-referential path expressions.
From: "Edward L. Knoll" <ed.knoll@xxxxxxxxxxxxxx>
Date: Thu, 11 Jul 2002 12:37:00 -0600
nested path expressions
I am attempting to construct a path expression for a template which only
accepts the specified element if an element exists with the same name in
another portion of the document.  What I currently have (which works) is
represented abstractly as the following:

<xsl:template match="Row/*">
   <xsl:variable name="MyName" select="name()" />
   <xsl:if test="/Table/Columns/*[name()=$MyName">
        ....
   </xsl:if>
</xsl:template>

What I want to do is combine the if with the "match=..." clause of the
template.  The problem is that I need to reference the "name()" of the
context/element with the "name()" in a different context/element.  The
logical expression would be somethink like the following:

<xsl:template match="Row/*[/Table/Columns/*[{inner context name}={outer
context name}]]">

Can/how do I reference a element/component of the outer context for
comparison in the inner context?

Thanks,
Ed Knoll

--
Edward L. Knoll   Phone (work)     : (719)484-2717
                  e-mail (work)    : f49660c@xxxxxxxxxxxxxx
                  e-mail (business): eknoll@xxxxxxxxxx
                  e-mail (personal): edward@xxxxxxxxxxx









 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.