orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 220 forks source link

Possible form indentation lost when writing to MySQL #2584

Open ebruchez opened 8 years ago

ebruchez commented 8 years ago

From comments by @theelectricwiz in #2515:

One other thing that I have noticed and thought I would bring up here is the formatting (namely indentation and line breaking) of the forms with form builder. I have noticed that the forms are stored with the indentation and line breaks (except in text) removed, but when opened in the editor are nicely formatted. This could be an issue for storing the forms on disk if you like nice formatting. Why is the indentation/breaks removed?

and:

I have noticed it in a MSSQL server. The place I have noticed it is when a form is opened in form builder, the source code is viewed and edited/replaced and then saved. I noticed that the indentation changes and the comments are moved from being on their own line to being included at the start of next line that is not a comment.

I didn't notice this with eXist. I think the behavior should be to remove unneeded whitespace when storing in eXist and relational databases at least, for performance reasons, and to restore formatting when editing source in Form Builder.

bytesnz commented 8 years ago

Thanks Erik. Apologies for not looking into this further as well. I was going to try and figure out at what stage it was happening and if it was happening with other stores.

ebruchez commented 8 years ago

@theelectricwiz No problem. Let us know if you find something.

bytesnz commented 8 years ago

Hey Erik. Just had a look at in an Orbeon instance using Exist now that I have one again. No indentation lose. I think it probably is MSSQL thinking it is smarter than I am https://www.youtube.com/watch?v=Ifleu0VVAc0. I am happy that the issue is closed and put down to bad Microsoft bad.