Incorrect additional xml tag is added into Correspondence rules
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.
No error message just an incorrect tag: "<?xml:namespace prefix = "pega" />".
Steps to Reproduce
- Create a Rule-Corr-Fragment.
- Add plain text and properties.
- Save and checkIn the rule. Observe that the incorrect tag is added to the XML source stream.
Browser adds the XML namespace prefixes with PEGA as there are Pega tags in the content-editable frame.
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*\\/>","");
0% found this useful