xsl-list
[Top] [All Lists]

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

2009-09-17 23:20:14
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/ >
“What a dream life would seem if you could see the world from
 inside an Etch-A-Sketch.” — Andrew Bird, “Tea & Thorazine”
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>