Subject: [xsl] changing context node From: "Laura" <xsl_list@xxxxxxxxxxx> Date: Thu, 5 Dec 2002 13:49:48 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] name of attributes like n, David Carlisle | Thread | Re: [xsl] changing context node, G. Ken Holman |
Re: [xsl] name of attributes like n, David Carlisle | Date | Re: [xsl] changing context node, G. Ken Holman |
Month |