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

: Context inside nested for-eaches from different docum

Subject: : Context inside nested for-eaches from different document()s
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Mon, 28 Jan 2002 15:13:43 -0000
different document context
Dear List

I have something like this:

<xsl:variable name="a" select="document('a.xml')/TopNode"/>
...

<xsl:template match="elementX">
<xsl:for-each select="$a">
<xsl:value-of select="./@AnAttribute[../@DifferentAttribute= <<here I want
to refer to an attribute from an elementX>>]"/>

My problem is that normally the for-each would be iterating over a node
inside the current document, so to get up out of the loop to the current
match would involve moving up the document structure.  
In this case, where the loop is iterating over nodes from a different
document held in a variable, the matched node seems to be inaccessible. How
can I get at my elementX?

Hypothetically, this situation could be even further nested. Would it be
useful if you could navigate up and down the nested levels to get at the
current node of each? This would be a new axis, with less to do with
document structure than the logical structure of the stylesheet.

It could be that a situation like this is the result of bad design, but any
comments would be welcome.
Thanks,
Tom

 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.