Subject: Re: [xsl] Newbie wonders why the variable can change value? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Mon, 21 Feb 2011 23:27:11 +0000 |
A template that only matches the top of the tree, the Org-level ACCT, processes and nests the appropriate siblings as follows :
<xsl:variable name="currentOR" select="HIERARCHY_Info/@Acct_ID"/> <xsl:apply-templates mode="RE" select="../ACCT[HIERARCHY_Info/@Prnt_Acct_ID=$currentOR]"/> I use the variable, because the following alternative coding returns none of the sibling nodes, nodes, because (I think) it compares the siblings' parent-acct-IDs to their own acct-IDs:
<xsl:apply-templates mode="RE" select="../ACCT[HIERARCHY_Info/@Prnt_Acct_ID=HIERARCHY_Info/@Acct_ID]"/>
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Newbie wonders why the va, Brandon Ibach | Thread | [xsl] Cheaper to prepend or append , Costello, Roger L. |
Re: [xsl] "Heap" of trouble handlin, Michael Kay | Date | Re: [xsl] "Heap" of trouble handlin, Dave Pawson |
Month |