[BUG] Switch off automatic XML indenting when opening documents
Where in the eXide code can I switch off the "auto-indent" feature that happens when you open an XML document in eXide?
When I open a document formatted like this:
<emptyTemplate>This is an ex<del>e</del><add>a</add>mple.</emptyTemplate>
eXide will automatically insert hard returns and spaces:
<emptyTemplate>This is an ex<del>e</del>
<add>a</add>mple.</emptyTemplate>
Were can I change the code to prevent this from happening, and to make eXide open the documents as they are instead of automatically formatting them and indenting nested tags?
It took me a while to notice this was happening, and it will take many hours of manual work to correct all of the errors (by way of unwanted extra whitespace) that have crept into my project's XML transcriptions because of this.
best, Vincent Neyt
eXide v3.2.0 added fine-grained serialization preferences, including the ability to control indentation when opening an XML document in eXide. See the documentation on this at https://github.com/eXist-db/eXide/blob/develop/docs/docs.md#options-for-xml-documents-loaded-from-the-database.
Here's a screenshot of the Serialization preferences:
May I append a follow-up question here?
As far as I can tell, these preferences are stored by the browser – in cookies? Could they instead be saved in a configuration file within eXist, to persist between browsers and browser cache deletions?
@jjarosch You're correct, these preferences are stored in the browser's session storage. eXide is often used in multi-user environments, so storing a single set of preferences in the database might make that scenario difficult. But I'd be open to an issue proposing an approach for community feedback, and I'd happily review a PR implementing the proposal.