This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Problem with constructing a tree
- From: "Yash" <yashdeep at ekartha dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 27 Jul 2002 11:53:12 +0530
- Subject: [xsl] Problem with constructing a tree
- References: <200207262228.SAA04600@biglist.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I have a problem where I need to construct a tree from an xml file:
The xml file looks like this:
<feeAgreement>
<feeClauses clauseid="1" rootclause="false">
<computationUnit name="xxxx">
<complexComputationUnit clauseid="2"/>
</computationUnit>
</feeClauses>
<feeClauses clauseid="2" rootclause="false">
<computationUnit name="yyyy">
<complexComputationUnit clauseid="3"/>
</computationUnit>
</feeClauses>
<feeClauses clauseid="3" rootclause="false">
<computationUnit name="zzzz">
<complexComputationUnit clauseid="1"/>
</computationUnit>
</feeClauses>
</feeAgreement>
Now, I would like to typically use recursion to construct the tree, starting
at the first feeClauses element. When I get to the complexComputationUnit
element's clauseid attribute, I would like to go over and find the clause
with the clauseid specified here.
The problem is, I need to know if the clause is already present, as in the
case of clause 3, which refers to clause 1. Here, I need not get the first
clause.
I cannot seem to think of a way of checking while transforming whether I
have the clause already in the transformed part.
Any help would be greatly appreciated.
Thanks,
Yashdeep Patil.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list