We have a complex XDP for Appraiser Application Form with XML Data Model (default one, nothing fancy). There is another XDP of the same Application Form, same layout, but with different model and XML Structure. The XML Structure of the 2nd form is based on format which I am not familiar with, but I can understand what is in there.
The 1st XML is plain vanilla XML, straight forward.
The 2nd XML has multiple nested sections, and the field names are specified in the attribute of the tag element. The images are specified in the attachment section, and the are references from the relevant tag element.
I think i can manage to write XSLT to perform the transformation. However, I am facing the following difficulties:
1. The image fields are located in another element. I mean, you have to do another lookup to find the image Base64 data. For example, the image field in the XML above app_rep2/appraisal/form[@name="photo1"]/tag[@name="PHOTO1"] is pointing to "../../../attachments/attachment[@key='267463fa-0073-4c10-83d6-fd8141641b72']" which has the image data and possibly some other details. I was unable to use XSL to perform this operation. I found some libraries that can do that, see this for example:
When I tried to use the library, it didn't work, I am not sure why. Also, I don't know if this is supported with Adobe XFA and Acrobat.