6 Replies Latest reply: Jul 30, 2010 2:01 AM by alexr@protech RSS

    Splitting XML with Transform

    alexr@protech Community Member

      I am working on an application to create Work Orders using output. The host application sends a batch of Work Orders in XML format (generated using JFTRANS from the Central Migration). The XML contains the customer number. I use Transform to sort the incoming XML by customer number.The structure of the XML is like this:

       

      <File>

           <Record>

               <Header>

                     <custno>1234</custno>

                     <wonumber>001234<.wonumber>

                     <page>1</page

                     .

                     .

                </Header>

                <Detail>

                     <lineno>1</lineno>

                     <itemno>004444</itemno>

                     .

                     .

                </Detail>

                <Detail>

                     <lineno>2</lineno>

                     <itemno>005555</itemno>

                     .

                     .

                </Detail>

                <Header>

                     .

                </Header>

                <Detail>

                     .

                </Detail>

           </Record>

           <Record>

                .

           </Record>

      </File>

       

      I tried to use the "Generate Multiple Streams" option of Output/generatePDFOutput to split the output by customer. Unfortunately, the "Generate Multiple Streams" only offers splitting on a "Record" level, not based on content. I need to generate a separate output file for each customer, which could have multiple Work Orders, each with 1 - n pages.

       

      The Foundation/Transform activity doesn't seem to have the functionality to define an XML split via XSLT.

       

      Has anyone done this before?

       

      Thank you!