Posts tagged "xml"

Acrobat/Reader: Some special characters are not escaped in XML submission to a HTTP URL

Issue

If you are using XFA forms to submit/export data in XML format from Acrobat/Reader, you may notice that some of the special characters (<>”&’) are not being escaped in the XML output. This can lead to problems if this XML is then to be parsed server-side or used by custom applications.

Explanation

The XML data submitted/exported from Acrobat/Reader escapes characters like & (ampersand) > (greater than) and < (less than), but not ” (quote) or ‘ (apostrophe).  Custom applications may encounter problems when trying to parse XML data containing apostrophe or quote characters, if they are expecting these characters to be escaped like for <, > and &.

There are 5 predefined entity references in XML (http://www.w3schools.com/xml/xml_syntax.asp):

&lt;  < less than
&gt;  > greater than
&amp;  & ampersand
&apos;  ’ apostrophe
&quot;  ” quotation mark

Note: Only the characters “<” and “&” are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.

So the XML specification recommends to replace only “<”, “&” and “>”.  It does not require quote and apostrophe characters to be escaped for element values.  Therefore all conformant XML parsers should be able to handle this.

Quotes and apostrophes only need to be escaped if they occur in an attribute value surrounded by the same single or double-quote character.  In this case, Acrobat/Reader will escape the quote or apostrophe characters as required.

Notes:

You can use a regular button with script like “event.target.submitForm({cURL: url, cSubmitAs:”XML”});” to submit data in XML format to a specific URL.

reference: (182809204/3054499)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 6.3/10 (4 votes cast)

LiveCycle ES: NullPointerException importing a process XML into Workbench

Issue

 If you are using Workbench 8.2.1 to import a process XML, you may encounter the following error:

java.lang.NullPointerException
at com.adobe.workflow.eclipse.editors.WorkflowEditor.createPartControl(WorkflowEditor.java:610)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:183)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:153)
at com.adobe.workflow.eclipse.editors.WorkflowMultiPageEditor.createMainBranchPage(WorkflowMultiPageEditor.java:739)
at com.adobe.workflow.eclipse.editors.WorkflowMultiPageEditor.createMainBranchPage(WorkflowMultiPageEditor.java:687)
at com.adobe.workflow.eclipse.editors.WorkflowMultiPageEditor.createPages(WorkflowMultiPageEditor.java:225)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:276)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)

Reason

This error occurs when the process XML is corrupted, and in particular, when there are negative coordinates in the positioning of objects. Each object on a process/orchestration map has x- and y-coordinates to position it on the canvas. These coordinates must be positive values to appear on the canvas.  If any of these values are negative, then the object is positioned off the canvas and isn’t editable in Workbench.

This issue has been fixed in later versions of Workbench.

Solution

There is a patch for Workbench 8.2.1.2 that produces a better error message to show the user exactly what objects have issues in the process XML. You can then edit the process XML in a text editor and replace the negative value (for example, =”-12″) with a positive value (for example, =”12″).  This edit allows the process to be imported without errors.

reference: (181599834/2630027)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle Designer: Wrong type parameter supplied to a PDS procedure

Issue

 If you are using Designer to preview an XDP in the PDF Preview tab, you may receive the following error:

Wrong type parameter supplied to a PDS procedure

Reason

 This error usually appears when the XML structure is no longer valid, i.e. it has been edited manually.

Solution

 Open and save the form in Designer7.1, then it will correct any problems in the XML source, and work fine in PDF Preview.

Opening in Designer8.0 and later versions will also correct any issues.

reference: (1-33514950)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.5/10 (2 votes cast)