How to prevent indenting with eXide / eXist ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to prevent indenting with eXide / eXist ?

RemiKoutcherawy
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 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to prevent indenting with eXide / eXist ?

Joe Wicentowski
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
<[hidden email]> wrote:

> 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
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...