This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: creating nesting from flat xml
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 28 Aug 2002 09:15:16 +0100
- Subject: RE: [xsl] creating nesting from flat xml
- Reply-to: xsl-list at lists dot mulberrytech dot com
> this problem has me scratching my head, i do not require a total
> solution, but perhaps a hint. I have run into mismatched tags quite a
> bit, i am thinking i have to use position()?
>
> a new <div> is required every time an <a> is encountered
>
> surely this list has seen this before?
Yes, it came up yesterday: see
http://www.biglist.com/lists/xsl-list/archives/200208/msg01182.html
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
>
> thank you in advance.
> darrell dupas
>
>
> =====================
> <xmlfile type="before-transform" >
> <a>grp1 title</a>
> <b>grp1 member a </b>
> <b>grp1 member b </b>
> <a>grp2 title</a>
> <b>grp2 member a </b>
> <b>grp2 member b </b>
> <b>grp2 member c </b>
> <b>grp2 member d </b>
> <a>grp3 title </a>
> <b>grp3 member a</b>
> </xmlfile>
> =========================
> <xmlfile type="desired-result" >
> <div>
> <a>grp1 title</a>
> <b>grp1 member a </b>
> <b>grp1 member b </b>
> </div>
> <div>
> <a>grp2 title</a>
> <b>grp2 member a </b>
> <b>grp2 member b </b>
> <b>grp2 member c </b>
> <b>grp2 member d </b>
> </div>
> <div>
> <a>grp3 title </a>
> <b>grp3 member a</b>
> </div>
> </xmlfile>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list