Re: [xsl] Creating multiple nodes from a source node data

Subject: Re: [xsl] Creating multiple nodes from a source node data
From: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Thu, 17 Sep 2009 23:19:34 -0400
Birender Pal wrote:
> I'm trying to find a way to transform an XML element text and form
> elements using that text.
> 
> In input XML ------------ is a delimiter which signifies the starting
> of new emp info.
> I'm using XSL version 2.0, can the gurus please suggest me a way to
> achieve this.

Funny, I just had to solve this exact same problem recently.  But for
some reason I thought you were stuck with XSLT 1.0.

With XSLT 2.0, the trick is to use a lot of xsl:for-each-group.  Each
group ending with a text node with ----- becomes a case or emp or
whatever, and then you can use xsl:for-each-group on the current-group()
to get the pieces of caseinfo or empinfo teased out.

HTH,
Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
bWhat a dream life would seem if you could see the world from
 inside an Etch-A-Sketch.b b Andrew Bird, bTea & Thorazineb
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

Current Thread