Skip to Content
author's profile photo Former Member
Former Member

Split XSLT Output into Multiple Files

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!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 28, 2007 at 06:05 PM

    You can do this with an additional GUI mapping. Use the one you have as target as source in this new mapping. Use multi-mapping by adjusting the cardinality of the new target structure. As many messages you create, those many files should get generated at the adapter level.

    VJ

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.