Skip to Content
0
Former Member
Dec 28, 2007 at 05:47 PM

Split XSLT Output into Multiple Files

264 Views

I have an XML-to-File scenario working, but now I need to split my XSLT map output into multiple files based on the data. I have been reading the Jin Shin blog on message splitting, but don't know that it pertains to my situation.

XML data getting mapped with XSLT map creates output formatted like this.

<?xml version="1.0" encoding="utf-8"?>

http://graybar.com/cold/invoice">

<Header>

<RecordID>HDR</RecordID>

<InvoiceNumber>15</InvoiceNumber>

</Header>

<Details>

<RecordID>DTL</RecordID>

<LineItemNumber>001</LineItemNumber>

<UnitPrice>1.25</UnitPrice>

</Details>

<Details>

<RecordID>DTL</RecordID>

<LineItemNumber>002</LineItemNumber>

<UnitPrice>2.22</UnitPrice>

</Details>

<Header>

<RecordID>HDR</RecordID>

<InvoiceNumber>16</InvoiceNumber>

</Header>

<Details>

<RecordID>DTL</RecordID>

<LineItemNumber>001</LineItemNumber>

<UnitPrice>3.33</UnitPrice>

</Details>

</ns1:ColdInvoiceData>

I currently have this output writing to a file (FTP, File Conversion). A single file is no issue, but I need to send multiple files for every set of HDR/DTL(s). I also need to put the invoice number in the filename (which is working fine as a parameter in my single FTP File CC now).

Can I make this happen with message splitting and maybe a second map (GUI map)? Do I need to adjust the XSLT output XML format to have an invoice level? Is there a better way to go?

Thanks!