jenlion
IS-IT--Management
- Nov 13, 2001
- 215
I have an xml file that I am converting to a new xml file. Currently I'm creating an xslt file with MapForce to do this.
My issue is that my source file contains data at low-levels of the file, and my destination needs that data grouped at high-level:
Source
Destination
I've simplified it to only show the relevant elements; obviously there's a lot more in the source file's header and line records. But the weird thing is that the source file's header may have lines for multiple warehouses. And there's nothing like a "batch" in the source file.
What I need to do is pull all of the source PO Headers out by company and put them in one batch with all of their lines by warehouse. Basically, Company1 and WarehouseA are one batch; Company1 and WarehouseB are one batch; Company2 and WarehouseA are one batch; Company2 and WarehouseB are another batch.
Since we're calling the xslt programmatically (via saxon), I'm hoping that there's some grouping functionality to call on here? Currently using MapForce but still pretty new to it; hoping to keep all this within mapforce but the concept is more important than the editor.
My issue is that my source file contains data at low-levels of the file, and my destination needs that data grouped at high-level:
Source
Code:
<Receipt>
<Receipt Header>
<Warehouse/>
<Receipt Lines>
<Company/>
</Receipt Lines>
</Receipt Header>
</Receipt>
Destination
Code:
<Receipt Batch>
<Company/>
<Warehouse/>
<Receipt Header>
<Receipt Lines>
</Receipt Lines>
</Receipt Header>
</Receipt Batch>
What I need to do is pull all of the source PO Headers out by company and put them in one batch with all of their lines by warehouse. Basically, Company1 and WarehouseA are one batch; Company1 and WarehouseB are one batch; Company2 and WarehouseA are one batch; Company2 and WarehouseB are another batch.
Since we're calling the xslt programmatically (via saxon), I'm hoping that there's some grouping functionality to call on here? Currently using MapForce but still pretty new to it; hoping to keep all this within mapforce but the concept is more important than the editor.