|
Subject: Re: [xsl] build group of elements From: henry human <henry_human@xxxxxxxx> Date: Sun, 24 Jun 2012 15:41:52 +0100 (BST) |
Hi
sorry for my mistake..again the input xml data and the expecting output:
The xml data has many foo elements (1000).
XMLDATA
-------
<?xml version="1.0" encoding="UTF-8"?>
<xmldata>
<ss> s </ss>
<nn>n </nn>
<foo>tt</foo>
<foo>bb</foo>
<foo>aa</foo>
<foo>mm</foo>
<foo>ll</foo>
<foo>nn</foo>
<foo>ff</foo>
<foo>gg</foo>
<foo>ii</foo>
<hh>h</hh>
</xmldata>
------------OUTPUT
<fooGroup>
<frirst_element>
<_1st_elment>tt</_1st_elment>
<_2nd_element>bb</_2nd_element>
<_3rd_element>aa</_3rd_element>
</frirst_element>
<_2nd_element>
<_1st_elment>mm</_1st_elment>
<_2nd_element>ll</_2nd_element>
<_3rd_element>nn</_3rd_element>
</_2nd_element>
<_3rd_element>
<_1st_elment>ff</_1st_elment>
<_2nd_element>gg</_2nd_element>
<_3rd_element>ii</_3rd_element>
</_3rd_element>
</fooGroup>
<fooGroup>
...
</fooGroup>
<fooGroup>
...
</fooGroup>
--- Martin Honnen <Martin.Honnen@xxxxxx> schrieb am Fr, 22.6.2012:
> Von: Martin Honnen <Martin.Honnen@xxxxxx>
> Betreff: Re: [xsl] build group of elements
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Datum: Freitag, 22. Juni, 2012 15:57 Uhr
> henry human wrote:
>
> > Now in other place three is similar node which is more
> complecated and I could not use your template to create the
> desired output!
> > Here is a sample. In this sample each group have 3
> elements and the
> > name of elemnts are more complex dann befrore:
> >
> > <fooGroup>
> >
> <frirst_elment>
> >
> <1st_elment></1st_elment>
> >
>
> <_2nd_element>aa</_2nd_element>
> >
>
> <_3rd_element>aa</_3rd_element>
>
> >
> </frirst_element>
> > <_2nd_elment>
> >
> <1st_elment></1st_elment>
> >
>
> <_2nd_element>aa</_2nd_element>
> >
>
> <_3rd_element>aa</_3rd_element>
>
> >
> </_2nd_element>
> > <3rd_elment>
> >
> <1st_elment></1st_elment>
> >
>
> <_2nd_element>aa</_2nd_element>
> >
>
> <_3rd_element>aa</_3rd_element>
>
> >
> </3rd_element>
> > </fooGroup>
>
> I am willing to adjust the code I posted but please post
> well-formed XML input and desired result samples explaining
> the more complicated requirement.
>
> --
> Martin Honnen --- MVP Data Platform
> Development
> http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] build group of elements, Martin Honnen | Thread | Re: [xsl] build group of elements, G. Ken Holman |
| Re: [xsl] Xpath Syntax Issue, Nathan Tallman | Date | [xsl] calculate UTC, henry human |
| Month |