A developer asks: Our application writes the result of an XML rule to a property value using the Property-Set-XML method.
The result contains the correct property value, but with two leading and trailing spaces around each value.
What causes these leading and trailing spaces, and what can we do about them?
Like HTML rules, XML rules are processed by stream processing. By default during stream processing, property references are padded with a single space before and after the value.
To eliminate this padding, specify a mode of LITERAL in the reference directive:
In the JSP reference tag, specify this in the
<pega: reference name="myproperty" mode="literal" />
This works for XML, HTML rendered in a form, and HTML sent out as email or Word correspondence.