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

exported xml with xslt

NP_Martin
Registered: Apr 29 2008
Posts: 4

Hi, Everyone,
with the xfa.host.exportData("", 0); method it is possible to export user entered data into an xml file. In my case, the form itself needs to be connected to an xsd, but the output xml file must also contain a reference to a specific xslt file.
My question is how to make sure that this reference to the xslt file is contained within the output xml file?
Thanks in advance
Martin

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can force data inports and exports to go through an XSLT file. This is part of the process of hooking the form up to an XML from the DataView tab. I don't know about including it in the exported XML file. You'll have to try it and see what happens.

There is another problem with the JavaScript function. It's restricted. The XFA Object reference is pretty poor when it come to listing security issues, but this function has exactly the same problem as the "doc.exportXFAData" function in the Acrobat JavaScript reference. Look it up. In fact, it is the same function. For the most part the XFA host domain simply calls existing functions in Acrobat JavaScript.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

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

NP_Martin
Registered: Apr 29 2008
Posts: 4
Thom, thanks for your kind reply, let's hope that a newbie like me will get lucky enough to find the answer. I promise to share it.
(I sent you an e-mail question as well concerning the problem with the exportData method in Adobe Reader. Have you had time to read it? I'm very curious about your opinion.) Thanks again:
Martin
diegoap
Registered: Apr 4 2008
Posts: 52
NP_Martin wrote:
Thom, thanks for your kind reply, let's hope that a newbie like me will get lucky enough to find the answer. I promise to share it.
(I sent you an e-mail question as well concerning the problem with the exportData method in Adobe Reader. Have you had time to read it? I'm very curious about your opinion.) Thanks again:
Martin
It will be interesting if the doubts were posted here in the forum.

Thanks.

Diego Silva
http://diegosi.wordpress.com

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Actually I did answer your email question about exporting from Reader in my previous post. Exporting data to a local hard drive using the JavaScript function is restricted. For security reasons it can't be done without user interaction, as stated in the Acrobat JavaScript reference.

However, in a LiveCycle form it's a bit trickier because a local XML file can be used as a data source. You'll find more info about this in the LiveCycle Documentation. However, in General it has the same restrictions. To export data from Reader the document requires Reader Enabling. Which can be applied to the document with the "Advanced > Enable Usage Rights in Adobe Reader..." menu item.

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

diegoap
Registered: Apr 4 2008
Posts: 52
thomp wrote:
Actually I did answer your email question about exporting from Reader in my previous post. Exporting data to a local hard drive using the JavaScript function is restricted. For security reasons it can't be done without user interaction, as stated in the Acrobat JavaScript reference.However, in a LiveCycle form it's a bit trickier because a local XML file can be used as a data source. You'll find more info about this in the LiveCycle Documentation. However, in General it has the same restrictions. To export data from Reader the document requires Reader Enabling. Which can be applied to the document with the "Advanced > Enable Usage Rights in Adobe Reader..." menu item.
Hello Thomp,

Enabling Usage Rights in Adobe Reader as you said isn't enough to export data from Reader. What I've had read is needed to certify the form by Rights Management ES. Does this information proceed?

Diego Silva
http://diegosi.wordpress.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
diegoap ,

One can create a folder level JavaScript that uses the "privileged" context and the "trustedFunciton", so a certified document might not be necessary. A certified document would be needed if the form will be distributed outside of a control environment where one might not be able to update the user's folder level scripts. This technique will allow local testing without having to have the document certified, or a user wants to have the access to some restricted features locally.

George Kaiser

diegoap
Registered: Apr 4 2008
Posts: 52
gkaiseril wrote:
diegoap ,One can create a folder level JavaScript that uses the "privileged" context and the "trustedFunciton", so a certified document might not be necessary. A certified document would be needed if the form will be distributed outside of a control environment where one might not be able to update the user's folder level scripts. This technique will allow local testing without having to have the document certified, or a user wants to have the access to some restricted features locally.
Mr. Kaiser,
Thanks for the answer. But could you explain more detailed how can I create a folder level as you said?
I've been trying to do tests using Reader and a form that has the exportData("") function. Before I do open the form in Reader, I do apply the Usage Rights in Acrobat as Mr. Parker said and this hasn't been working.

Diego Silva
http://diegosi.wordpress.com