These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Handling XML data and schemas

bigme
Registered: Oct 7 2010
Posts: 3
Answered

Hello there,
 
I'm using LiveCycle Designer 8.2 to build a form for a survey. My problem is that, as an output, I need my data to be saved on the client's drive as an XML in a specified format that includes the usage of namespaces and attributes. So I added a data connection, specified my XML schema and also an XSLT transformation for the output data.
Then I executed all the bindings, added an export button, and used xfa.host.exportData("",0); on the onclick event, but nothing worked. My output XML file was not transformed by the XSLT.
I tried to apply the instruction xfa.data.applyXSL, but (my fault) I wasn't able to find any working example of this.
Can anyone help?
What am I doing wrong?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You've got another couple of issues besides getting the correct output format. Exporting data to the local hard drive cannot be done with Adobe Reader. Well, that's not necessarily true, it can be done if the PDF is Enabled with special Reader Rights that can only be applied with the LC Servers. The second problem is that exporting data is a privileged operation. It can only be done from a trusted context, which is probably why your script is failing. Have you checked the console window for errors?

Read these articles:
http://acrobatusers.com/tutorials/how-debug-your-script
http://acrobatusers.com/tutorials/why-doesnt-my-script-work



Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

bigme
Registered: Oct 7 2010
Posts: 3
I checked the debug console for errors but, no way, it's simply blank. There's no LC Server in my organization to grant special reader rights to our survey's PDF. We were evaluating LC Designer to migrate old surveys, basing on the fact that the Acrobat Reader is commonly used by our customers. Though we still need the XML output to be correctly formatted and it must be saved locally, due to process the data with our pre-existing server side tools. Maybe this just means LC Designer alone is not suitable for our purposes.
Anyway thank you very much for your answer, thomp.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If you can use the "Forms > Manage Form Data > Export Data..." menu item to export XML in the desired grammar, then there is a possible solution. But this is the first thing that has to work. If the XSLT isn't working you can always apply it after the data has been exported. So don't worry about that bit right now.If the goal is to use existing server side tools then the form can submit the data to a server script, and then the server can deal with it.


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script