xsl-list
[Top] [All Lists]

RE: Keeping the Current Context

2003-03-27 09:50:17
Just so I am sure I understand...
The nested(2nd) for-each doesn't loop, it just switches the context
back.

Peter Eschenbrenner

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
David
Carlisle
Sent: Thursday, March 27, 2003 10:40 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Keeping the Current Context





Question:
How can I loop through an external file while keeping the current 
context?


various ways, all variants on

<xsl:template match="columns/column">
<xsl:variable name="thiscol" select="."/>
<xsl:for-each select="document('foo.xml')/a/b/rulename">
<xsl:variable name="thisrule" select="."/>
<xsl:for-each select="$x">
    <xsl:call-template name="getRules">
        <xsl:with-param name="ruleName" select="$thisrule" />
    </xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:template>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


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



<Prev in Thread] Current Thread [Next in Thread>