I have to create a mapping between two xsd schemas, where the input document contains a list (sequence) of elements, each of which maps to a single output document. Moreover, each output document should include top level input data that is not a part of the list. To illustrate the problem, the input document contains data about a customer (contact info, etc) and list of invoices for them, and the output should be multiple documents, each containing one invoice and the customer data.
Can I somehow do this using DataMapper or some other approach? If I create a mapping between the input list elements and the output document, DataMapper will output an aggregation of all the created output documents. It also seems that I can not refer to the input top level elements from inside the "list element to output document" mapping.