[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: build group of elements

Subject: Re: build group of elements
From: henry human <henry_human@xxxxxxxx>
Date: Sun, 24 Jun 2012 15:41:52 +0100 (BST)
Re:  build group of elements
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.