Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Help with grouping >Thread Next - Re: Help with grouping Re: Help with groupingTo: NULL Date: 12/6/2008 9:28:00 AM This is a multi-part message in MIME format. ------=_NextPart_000_02E9_01C95784.E9F3FA30 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit "fj" <fj@m...> wrote in message news:deg_k.8137$D32.4135@f...... > I don't have much time to search the right solution, I really need your > help with this one, not very familiar with xslt. > Or, you can point me a URL. Much appreciated. > > source XML > <?xml version="1.0" encoding="UTF-8"?> > <Inbound> > <header> > <record> > <id>101</id> > <desc>cloth</desc> > </record> > <record> > <id>102</id> > <desc>toys</desc> > </record> > </header> > <detail> > <record> > <headerid>101</headerid> > <quantity>200</quantity> > <destination>Seatle</destination> > </record> > <record> > <headerid>101</headerid> > <quantity>280</quantity> > <destination>Santa Anna</destination> > </record> > <record> > <headerid>102</headerid> > <quantity>120</quantity> > <destination>LA</destination> > </record> > <record> > <headerid>102</headerid> > <quantity>240</quantity> > <destination>Shanghai</destination> > </record> > <record> > <headerid>102</headerid> > <quantity>200</quantity> > <destination>DC</destination> > </record> > </detail> > <specialInstruction> > <record> > <headerid>101</headerid> > <desc>Issuer is LA</desc> > </record> > <record> > <headerid>102</headerid> > <desc>Cancel</desc> > </record> > </specialInstruction> > </Inbound> > > Target XML file: > <?xml version="1.0" encoding="UTF-8"?> > <Outbound> > <Order> > <id>101</id> > <desc>cloth</desc> > <details> > <record> > <detailsid>101-1</detailsid> > <quantity>200</quantity> > <destination>Seatle</destination> > </record> > <record> > <detailsid>101-2</detailsid> > <quantity>280</quantity> > <destination>Santa Anna</destination> > </record> > </details> > <specialInstruction>Issuer is LA</specialInstruction> > </Order> > <Order> > <id>102</id> > <desc>toys</desc> > <details> > <record> > <detailsid>102-1</detailsid> > <quantity>120</quantity> > <destination>LA</destination> > </record> > <record> > <detailsid>102-2</detailsid> > <quantity>240</quantity> > <destination>Shanghai</destination> > </record> > <record> > <detailsid>102-3</detailsid> > <quantity>200</quantity> > <destination>DC</destination> > </record> > </details> > <specialInstruction>Cancel</specialInstruction> > </Order> > </Outbound> > > TIA > -fj > > (Probably not the best way to request help, you seem to be saying "I'm not prepared to do the work, someone do it for me.") I assume you're using XSLT 1.0, if not let us know. This link shows how to group using a technique called Muenchian grouping: http://www.jenitennison.com/xslt/grouping/muenchian.xml -- Joe Fawcett (MVP - XML) http://joe.fawcett.name ------=_NextPart_000_02E9_01C95784.E9F3FA30 Content-Type: application/octet-stream; name="Jeni's XSLT Pages Grouping Using the Muenchian Method.url" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Jeni's XSLT Pages Grouping Using the Muenchian Method.url" [DEFAULT] BASEURL=http://www.jenitennison.com/xslt/grouping/muenchian.xml [InternetShortcut] URL=http://www.jenitennison.com/xslt/grouping/muenchian.xml Modified=50B3A8151B2EC601D0 IDList= [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2 ------=_NextPart_000_02E9_01C95784.E9F3FA30-- | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
