This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
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!
Solved! Go to Solution.
Views
Replies
Total Likes
You're welcome Alex.
Since this is a recurring request on the forum I put together the attached PDF. The PDF describes a technique for splitting an XML document using the XSLT service and includes the following attachments: an ES2 .lca, a sample XML document and the XSL included in the process.
If you have any questions or comments please email stwalker.adobe@gmail.com.
Thanks,
Steve
Views
Replies
Total Likes
Different XSLT processors, including those that are XSLT 2.0 and Saxon 9 compliant, can split one XML document and write multiple XML documents. While the XSLT Transform operation uses Saxon (I am not sure which version) the DSC is not designed to output multiple results AFAIK.
You would have to use an external process or a custom script to do the split and writes.
Steve
Views
Replies
Total Likes
Does each Record node contain a complete document? If so then you should be able to tell Output to create new docs on each Record node.
Paul
Views
Replies
Total Likes
Thank you Steve. That's what I expected. I "bit the bullet" and wrote my own XML splitter to (a) split the XML and (b) pass a list of the resulting XML files back to the process. It would be nice if LC ES2.5 would let us do the split with the Transform / XSLT Service.
Views
Replies
Total Likes
Thank you Paul, unfortunately I can't use the "Generate Multiple Streams" option. The <Record> level could be a new transaction or a "Page n of m" and I need to split on a transaction level.
Views
Replies
Total Likes
You're welcome Alex.
Since this is a recurring request on the forum I put together the attached PDF. The PDF describes a technique for splitting an XML document using the XSLT service and includes the following attachments: an ES2 .lca, a sample XML document and the XSL included in the process.
If you have any questions or comments please email stwalker.adobe@gmail.com.
Thanks,
Steve
Views
Replies
Total Likes
Hello Steve,
Thank you very much for this very helpful example and your thorough explanations.
I really appreciate it!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies