Expand my Community achievements bar.

A + B = C (XSLT Transformation of Data)

Avatar

Level 1

Greetings,

I want to import transformed XML data to my form created with Adobe LiveCycle Designer ES 8.2. Let me talk in simple examples, for it will be clearer.

I have XML Sample Data (data.xml):

<?xml version="1.0" encoding="UTF-8"?>
<data>
     <a>ONE</a>
     <b>TWO</b>
</data>

I have a form with just single Text Field, let's call it "C". What I want to do, is when I import my XML data file through Acrobat into my form, I need my text field C to fill in with this text: "ONE and TWO".

The way I tried to do it:

  1. Created New Data Connection
  2. Selected "Sample XML Data" and browsed to data.xml
  3. Ticked option "Transform Incoming Data"
  4. Selected my freshly created XSL file (transform.xsl):

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="data">
         <c><xsl:value-of select="a"/> and <xsl:value-of select="b"/></c>
    </xsl:template>
</xsl:stylesheet>

XSL file is OK, if I use it on my XML, it does transform it into <c>ONE and TWO</c>.

The problem is - now my PDF file imports nothing - even if I set my text fields binding to "$.a".I thought "$.c" should work, but I get the warning in LiveCycle, that "Default binding value '$.c' does not correspond to a data connection."

How do I bind my Text Field C to the <c> element created by XSLT? Maybe my XSL needs to be specific, sample anyone?

Can anyone point me to some reference on what can I write inside "Default Binding (Open, Save, Submit)"? God, Adobe's help files are as beneficial as a hammer for my computer.

0 Replies