Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Help with grouping

From: "Joe Fawcett" <joefawcett@---------.------>
To: 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--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent