|
Subject: How to transform flat structure into hierarchical one? From: "Aleksandrs Jakovlevs" <Aleksandrs_Jakovlevs@xxxxxxxx> Date: Tue, 6 Jun 2000 14:31:42 +0200 |
I get a flat structure as a result of SQL query and want to transform it
into hierarchical structure.
E.g. initial XML could look like:
<record_set>
<record>
<house_id>h1</house_id>
<room_id>r1</room_id>
</record>
<record>
<house_id>h1</house_id>
<room_id>r2</room_id>
</record>
<record>
<house_id>h2</house_id>
<room_id>r3</room_id>
</record>
</record_set>
and the result of transformation could look like:
<house_list>
<house>
<id>h1</id>
<rooms>
<room>
<id>r1</id>
</room>
<room>
<id>r2</id>
</room>
</rooms>
</house>
<house>
<id>h2</id>
<rooms>
<room>
<id>r3</id>
</room>
</rooms>
</house>
</house_list>
Thanks.
Alex
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: Xpath AndExpr on attribute valu, Kay Michael | Thread | Re: How to transform flat structure, Jeni Tennison |
| Re: Null Attributes Break xsl:key?, Jeni Tennison | Date | Re: Best way to handle multiple str, Sebastian Rahtz |
| Month |