From b9c3f19c841d5b194897924d30e36f6b3cf6121f Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Thu, 14 Nov 2013 12:39:44 +0800 Subject: [PATCH] Support "trim" attribute at the element. It is an optional attribute and is defaulted to true (i.e. trimmable). --- .../src/org/adempiere/pipo2/PackInHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java index 0b2cfa5381..07cbe8593e 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java @@ -301,8 +301,12 @@ public class PackInHandler extends DefaultHandler { { if (e.contents.toString().length() != e.contents.toString().trim().length()) { - String s = e.contents.toString().trim(); - e.contents = new StringBuffer(s); + String trim = e.attributes.getValue("trim"); + if (!(trim != null && trim.equals("false"))) + { + String s = e.contents.toString().trim(); + e.contents = new StringBuffer(s); + } } } if (stack.isEmpty())