Add serialization prefs when opening, downloading XML documents from database #328
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR eXide hard-coded serialization parameters—
indent=yes expand-xincludes=no
when opening and downloading XML documents from the database andindent=no expand-xincludes=no
when generating and downloading packages—and users had no means to change this behavior. Numerous times the indentation behavior of eXide caused confusion when users opened documents or saved documents and observed whitespace introduced into their documents. See these posts to exist-open:The only solution was to suggest editing eXide's sources to change the hardcoded default or to use a different editor.
This PR adds preferences for these two serialization parameters to the eXide preferences window:
The preferences default to the longstanding eXide defaults for opening and downloading individual documents:
indent=yes expand-xincludes=no
. The preferences also now govern serialization when generating and downloading packages via Application > Download app, and thus the default here is changed from a hardcodedindent=no
to follow the eXide Preference.The
load.xql
endpoint now supportsindent
andexpand-xincludes
parameters, just asdeployment.xql
had already done.Alternatives I considered:
configuration.xml
file instead ofsrc/preferences.js
- but none of the other preferences are set there, and I am not capable of the javascript needed to get thepreferences.js
file to read eXide's prefs from theconfiguration.xml
file.Previous work in this area includes: