Hi,

I've noticed that jBPM trims whitespace and removes newlines from scripts (or 
any action/delegation XML config).

With scripts, this can be a bit annoying for multiple reasons:
 - since there are no separate lines anymore, it makes error reporting by the 
script engine less readable
 - the meaning of things might be changed, e.g. a string like "   abc     def" 
will become " abc def".
 - single-line comments using "//" are not possible.

I've tracked the cause of this down to the creation of the class Delegation, 
where an XMLWriter is instantiated using "createCompactFormat" to create the 
serialized configuration:

XMLWriter xmlWriter = new XMLWriter( stringWriter, 
OutputFormat.createCompactFormat() );

I don't know if removal of the compact format usage would cause any issues 
(e.g. other places relying on the whitespace being removed) besides a little 
bit more whitespace stored in the database, but otherwise I would very much 
appreciate if it could be removed. Or maybe some attribute could be added to 
the action element to indicate the whitespace-treatment preference.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984453#3984453

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984453
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to