Discussion:
[Exist-open] How to prevent indenting with eXide / eXist ?
Rémi Koutchérawy
2017-07-05 15:52:49 UTC
Permalink
Hi list,

With eXide save a new file "demo.html"
<div>
<div>a</div><div>b</div>
</div>
then reload it, and see that it has been indented :
<div>
<div>a</div>
<div>b</div>
</div>

That gives an unwanted space... Which causes some problems, see for example:
https://stackoverflow.com/questions/19038799/why-is-there-an-unexplainable-gap-between-these-inline-block-div-elements

Is there a way to prevent eXide from indenting the file ?

BTW I am testing exist 3.3.0 and eXide 2.4.0
https://bintray.com/existdb/releases/exist/3.3.0
https://github.com/wolfgangmm/eXide/releases

Rémi
Joe Wicentowski
2017-07-05 17:32:12 UTC
Permalink
Hi Rémi,

This unwanted whitespace is introduced when eXide loads the document
into the editor. The query that performs this action is
modules/load.xql, which has this option declaration:

declare option exist:serialize "indent=yes expand-xincludes=no";

(See https://github.com/wolfgangmm/eXide/blob/develop/modules/load.xql#L23.)

If you change the "indent" option here from "yes" to "no", your
demo.html will load without the additional whitespace. (This
overrides the default serializer indent settings in conf.xml under
serializer/@indent.)

This would make a good preference, if not in the UI at first, then at
least we could store the preference in eXide's configuration.xml file.

Joe

On Wed, Jul 5, 2017 at 11:52 AM, Rémi Koutchérawy
Post by Rémi Koutchérawy
Hi list,
With eXide save a new file "demo.html"
<div>
<div>a</div><div>b</div>
</div>
<div>
<div>a</div>
<div>b</div>
</div>
https://stackoverflow.com/questions/19038799/why-is-there-an-unexplainable-gap-between-these-inline-block-div-elements
Is there a way to prevent eXide from indenting the file ?
BTW I am testing exist 3.3.0 and eXide 2.4.0
https://bintray.com/existdb/releases/exist/3.3.0
https://github.com/wolfgangmm/eXide/releases
Rémi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...