Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
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:


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


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


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


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


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


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
          HeadGeek@XMLPitstop.com

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.
Love,
Keo





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
DotNetSlackers
Buy links on this site!
server online backup
Diesel sunglasses
Geovision
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 XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139