Re: [xsl] backtracking to find all parents till root[again]

Subject: Re: [xsl] backtracking to find all parents till root[again]
From: Rahil <qamar_rahil@xxxxxxxxxxx>
Date: Tue, 24 May 2005 15:19:38 +0100
Aron Bock wrote:

Rahil,

I (for one) am unclear on the hierarchy with which you're working--do you have SubConcept as a "parent" of sibling SubConcept? That seems to be the case with

<SubConcept name="Broken..."/> and
<SubConcept name="Level1"/>

Both of these are sibling nodes. However the child of <SubConcept name="Level1"/> has a reference to <SubConcept name="Broken..."/> via the 'ref' value.



Also, wwhile you refer to "Time", I assume you mean "NextTime"?


Yeah it really means 'NextTime'. Had originally intended to ask two queries, for which Id written 'Time', but then decided not to complicate the mail !.

Hope I clarified your doubt. Else please let me know.

Thanks
Rahil


From: Rahil <qamar_rahil@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] backtracking to find all parents till root[again]
Date: Tue, 24 May 2005 11:52:05 +0100

How do I backtrack to the root element from the result-generating node? Hence if my given structure is of the form:

<Top>
   <SubConcepts>
         <SubConcept id="990" name="Level1">
               <Child ref="567">Child1</Child>
               <Value ref="456">hasFeature BrokenBolt</Value>
         </SubConcept>
         <SubConcept id="456" name="BrokenBolt">
               <Child ref="345">Child2</Child>
               <Value ref="123">hasProperty NextTime</Value>
         </SubConcept>
   </SubConcepts>
</Top>

I find my result in the <Value ref="123"> node with the contained value 'Time'. I can find the parent of this with the @name

Match found: Next
Parent: BrokenBolt
         Parent: Level1
         Parent: SubConcepts


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Current Thread