|
Subject: [xsl] Re: Flat -> Hierarchy --- Continue From: Dongling Ding <dling61@xxxxxxxxx> Date: Wed, 28 May 2003 15:51:49 -0700 (PDT) |
Sorry,
here is the output I want:
------------------------------------------------------
<Members>
<Member>
<Label>parent</Label>
<Description>r1</Description>
<Member>
<Label>firstchild</Label>
<Description>r2</Description>
</Member>
<Member>
<Label>secondchild</Label>
<Description>r3</Description>
<Member>
<Label>firstgrandchild</Label>
<Description>r3</Description>
</Member>
</Member>
<Member>
</Members>
-----------------------------------------------------
Dongling
--- Dongling Ding <dling61@xxxxxxxxx> wrote:
>
> Hi,
>
>
> I think there were some discussion about this topic
> already. But my case is a little different from
> others. I have a flat structure that need to be
> converted into a hierarchy based on another set of
> elements that define the relationship between
> members.
>
>
> I tried to use recursive and xsl:key methods and it
> seems like both of the two methods couldn't solve
> the
> problem.
>
> I am wondering if anyone has an idea on this
> particular case. Any help would be very appreciated!
>
>
> Input:
>
-----------------------------------------------------
> <Members>
> <Member>
> <Label>parent</Label>
> <Description>r1</Description>
> </Member>
> <Member>
> <Label>firstchild</Label>
> <Description>r2</Description>
> </Member>
> <Member>
> <Label>secondchild</Label>
> <Description>r3</Description>
> </Member>
> <Member>
> <Label>firstgrandchild</Label>
> <Description>r3</Description>
> </Member>
> </Members>
> <hierarchy>
> <node>
> <parent>parent</parent>
> <child>firstchild</child>
> </node>
> <node>
> <parent>parent</parent>
> <child>secondchild</child>
> </node>
> <node>
> <parent>parent</parent>
> <child>secondchild</child>
> </node>
> <node>
> <parent>secondchild</parent>
> <child>firstgrandchild</child>
> </node>
> </hierarchy>
>
------------------------------------------------------
>
> Output:
> ----------------------------------------------------
> <Members>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to
> Outlook(TM).
> http://calendar.yahoo.com
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Flat -> Hierarchy, Dongling Ding | Thread | RE: [xsl] Re: Flat -> Hierarchy ---, Lars Huttar |
| [xsl] Flat -> Hierarchy, Dongling Ding | Date | [xsl] grouping references so that t, Rick Geimer |
| Month |