You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by bu...@apache.org on 2009/04/10 13:27:36 UTC

DO NOT REPLY [Bug 42061] Method to disable XMLUtils.addReturnToElement

https://issues.apache.org/bugzilla/show_bug.cgi?id=42061





--- Comment #4 from coheigea <co...@apache.org>  2009-04-10 04:27:34 PST ---
Hi Sean,

Sorry for the delay in replying to this.

"Thanks for the patch, but I was thinking that you were going to add a method
that would enable this feature on a per-signature basis. Since it is a static
method, it affects all applications which is not ideal. I would suggest adding
a non-static method to the XMLSignature class."

The problem is that the existing method of disabling line breaks is static, as
it polls the system property statically. The existing method *already* affects
all applications, my patch was just a means of providing programmatic access to
changing this value. In my particular case I'm fine with disabling it for all
applications as I don't want any new lines inserted in any of the DOM created
by XML-Security, e.g. not just ds:Signature but also ds:KeyInfo elements.

My point is that enforcing whether to insert new-lines or not by polling a
system property once is unnecessarily restrictive, as it doesn't give the
programmer any control over this. 

I guess ideally there should be no static variable which controls this for all
applications, and it should be done by non-static methods on each of the
classes. 

Thanks,

Colm.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.