Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Switch off automatic XML indenting when opening documents #400

Open
vneyt opened this issue Dec 16, 2021 · 4 comments
Open

[BUG] Switch off automatic XML indenting when opening documents #400

vneyt opened this issue Dec 16, 2021 · 4 comments

Comments

@vneyt
Copy link

vneyt commented Dec 16, 2021

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

@joewiz
Copy link
Member

joewiz commented Dec 16, 2021

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.

@joewiz
Copy link
Member

joewiz commented Dec 16, 2021

Here's a screenshot of the Serialization preferences:

Screen Shot 2021-11-21 at 4 37 10 PM

@jjarosch
Copy link

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?

@joewiz
Copy link
Member

joewiz commented Feb 21, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants