Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Incorrect additional xml tag is added into Correspondence rules

SA-11323

Summary



Incorrect additional xml tag is sometimes added automatically to Correspondence and Fragment  rules.
The following tag, "<?xml:namespace prefix = "pega" />", is sometimes added to the XML stream of the rules and this unexpected tag is breaking the PDF generation of the correspondence rules.



Error Messages



No error message just an incorrect tag: "<?xml:namespace prefix = "pega" />".

Steps to Reproduce


 
  1. Create a Rule-Corr-Fragment.
  2. Add plain text and properties.

 
  1. Save and checkIn the rule. Observe that the incorrect tag is added to the XML source stream.

 

Root Cause



Browser adds the XML namespace prefixes with PEGA as there are Pega tags in the content-editable frame.

Resolution



Following is the local-change used to solve this issue.
Create a  new “pyPostSave” on the corresponding classes “Rule-Corr-Fragment” and “Rule-Corr” in order to remove the unexpected tag with a regular expression. Mentioned activity is just a single step of Java:



Following is the Java code:

String source = myStepPage.getString("pySourceStream");
//Using Regex to replace XML PEGA namespaces
source = source.replaceAll("(?i)<\\?xml\\s*:\\s*namespace\\s+prefix\\s*=\\s*pega\\s*\\/>","");
myStepPage.getProperty("pySourceStream").setValue(source);

 

Published July 20, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us