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

changing context node

Subject: changing context node
From: "Laura" <xsl_list@xxxxxxxxxxx>
Date: Thu, 5 Dec 2002 13:49:48 -0000
changing a node in xml
hello all.
I have a problem which  is as follows..

I am looping through an external document as in..
<xsl:variable name="external-merge-xml"
select="document('merge-spec.xml')"/>
  <xsl:for-each select="$external-merge-xml/Merging-Data/DBDetails">
<xsl:variable name = "dbDetails-id" select = "@id"/>
<!-- here i want to go through the source xml and match an id which is equal
to the $dbDetails-id.-->
<!--so-->
<!-- do either -->
<xsl:for-each select = "MainSrcDB/dbDetails[@id = $dbDetails-id]">
  -- some processing--
</xsl:for-each>
<!--or-->
<xsl:for-each select = "MainSrcDB/dbDetails>
<xsl:if test = "@id = $dbDetails-id">
    -- some processing--
</xsl:if>
</xsl:for-each>
<!--or -->
<xsl:apply-templates match = "/MainSrcDB/dbDetails"/>
 <!-- and define a template that matched dbDetails element -->
</xsl:for-each>

I am not able to do this because the context node is
$external-merge-xml/Merging-Data/DBDetails..
and the for-each doesnt produce any result..

Is there any other way to do this?
Thanks


 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.