| |   Skin:   
      User: Not logged in 
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Featured Articles
Book Chapters
Training Courses
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
About Me
My Blog
HeadGeek Articles
Talking Portfolio
World Trip Pics

Reply: grouping output

Date Posted:5/24/2005 9:24 AM
Posted by:
Gunnar Kaysen

Hi there,

I need to generate xml output from a source xml and a mapping xml file.
My source.xml looks something like this:

   <record id = "1" value = "A090"/>
   <record id = "2" value = "B200"/>

My mapping.xml file contains rules for transforming the record elements to some categories in the output file. mapping.xml looks something like this:

   <rule recordid = "1" categorie = "Categorie1">
   <rule recordid = "1" categorie = "Categorie2">
   <rule recordid = "2" categorie = "Categorie1">

My output.xml needs to group by categories and should look like this:

   <categorie name = "Categorie1">
      <record id = "1" value = "A090"/>
      <record id = "2" value = "B200"/>
   <categorie name = "Categorie2">
      <record id = "1" value = "A090"/>

The problem for me is to group the elements accordingly before writing them to output. I know about the Muenchian method but since I have two input files I can't calculate the keys for ordering in advance.Could anybody help me with this?

Cheers - Gunnar

Date Posted:5/31/2005 6:51 AM
Posted by:
David Silverlight
Hello Gunnar,

     This is definitely an interesting scenario.   Just curious, though, I see that this post was made about a week ago.   Before offering a solution and throwing a bunch of questions out there, have you already found a solution to this?

     Kindest regads,
          David Silverlight, Microsoft MVP - XML

Date Posted:1/10/2007 2:46 PM
Posted by:
Keo King
Hi, Gunnar........
I'm trying to find you to wish you a happy 40th birthday in time.  Maybe this will work.  I ran into Steve a few months ato;  said you were married, had a baby.  And most important that you are still in the same world as Steve and I.  I'm very glad.

Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”

Advertise on XMLPitstop

Advertise on XMLPitstop

EggHead Cafe
Web Servicee development
Buy links on this site!
server online backup
Diesel sunglasses
UK Domain Registration
Color Laser Printer
Buy links on this site!

Interested in Text ads?
2,277 Total Members
42 members(last 30 days)
13 members(last 7 days)
3 members(today)

1,629 Total Discussions
17 Posts(last 30 days)
2 Posts(last 7 days)
1 Posts(today)

20,047 Total Blog Posts
2,133 Blogs(last 30 days)
573 Blogs(last 7 days)
56 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,802 Total Resources
16 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


David Silverlight's| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139