XML Transformation using XSLT



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.

Following is a sample of the 1st XML:





  <NEW_Stage>Stage Value</NEW_Stage>


  <NEW_POOL_X>Nice Pool</NEW_POOL_X>





Following is a sample of the 2nd XML:

<app_rep2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.1">







        <collection>Report Pro</collection>

        <platform>Desktop Platform</platform>




      <form name="photo1" primary="false">

        <section type="other" number="0" name="section_name1">

          <tag name="TITLE_PHOTO">SamplePhotoLabel1</tag>

          <tag name="LINE_PHOTO">SamplePhotoDescription1</tag>


        <tag name="PHOTO1">../../../attachments/attachment[@key='267463fa-0073-4c10-83d6-fd8141641b72']</tag>


      <form name="Some-primary-form" primary="true">

        <section type="other" number="0" name="OPTIONS">

          <tag name="OPT_TYPE_OF_APPRAISAL">Appraisal Type Value</tag>


        <section type="subject" number="0" name="SUBJECT">

          <tag name="CITY">Toronto</tag>

          <tag name="STATE">Stage Value</tag>

          <tag name="GS_AGE">23</tag>

          <tag name="POOL_X">Nice Pool</tag>





      <attachment type="photo" label="" key="267463fa-0073-4c10-83d6-fd8141641b72">


          <binary format="jpeg">/9j/4AAQSkZJRgABAAEASABIAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCE








As you can see, I want to transform the 2nd XML to look like the 1st XML.

I think I need to first write the XSLT. Then, I need to import the 2nd XML into the 1st XDP, and apply the XSLT while importing.

Am I thinking in the right direction?

Can you please help achieve my goal? I am not exactly sure how to do that.


1. How to develop the XSLT?

2. How to apply the XSLT while merging the 2nd XML with the 1st XDP? How I can do than using Acrobat? How I can do that using Adobe LiveCycle Process Management?

Any help would be appreciated.



View Entire Topic



Yes, you can embed an XSLT into your XDP and have it run before the data is merged in the form. Keep in mind that Acrobat only supports XSLT 1.0, using a processor called Ginger Alliance.