[xslt] grouping elements (newbie question)
hi there
i'm a java guy but i have to do a project in xslt (conversion of xml documents) and i'm stuck :
input file is more or less this
<records>
<record>
<element1>lorem ipsum</element1>
<element1>lorem ipsum</element2>
<element1>lorem ipsum</element3>
<element1>lorem ipsum</element4>
<element1>lorem ipsum</element5>
<element1>lorem ipsum</element6>
<element1>lorem ipsum</element7>
<element1>lorem ipsum</element8>
<element1>lorem ipsum</element9>
<element1>lorem ipsum</element9>
<element1>lorem ipsum</element9>
<element1>lorem ipsum</element9>
</record>
<record>
<element1>lorem ipsum</element1>
<element2>lorem ipsum</element2>
<element3>lorem ipsum</element3>
<element4>lorem ipsum</element4>
<element5>lorem ipsum</element5>
<element6>lorem ipsum</element6>
<element7>lorem ipsum</element7>
<element8>lorem ipsum</element8>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
</record>
<record>
<element1>lorem ipsum</element1>
<element2>lorem ipsum</element2>
<element3>lorem ipsum</element3>
<element4>lorem ipsum</element4>
<element5>lorem ipsum</element5>
<element6>lorem ipsum</element6>
<element7>lorem ipsum</element7>
<element8>lorem ipsum</element8>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
</record>
</records>
now all i have left to do is group the element9 objects in a <question> object.
==>
<record>
<element1>lorem ipsum</element1>
<element2>lorem ipsum</element2>
<element3>lorem ipsum</element3>
<element4>lorem ipsum</element4>
<element5>lorem ipsum</element5>
<element6>lorem ipsum</element6>
<element7>lorem ipsum</element7>
<element8>lorem ipsum</element8>
<vraag>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
<element9>lorem ipsum</element9>
</vraag>
</record>
anyone have a clue how to do ?
thanx in advance
__________________
--- this space for rent --- pm me
|