I tried that, I figured it was not supported: 
[XQST0108] No output declarations allowed in library modules.

I get the error even when declaring the namespace:
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; 

After multiple tries, I was able to get it with this:

declare %rest:path("/test-extra-spaces/test-1")
        %rest:GET
        %output:method('html')
        %output:html-version('5.0')
        %output:indent('no')...


However, I'd still like to know what I am missing when I get the first error because a lot of update functions don't have a rest path. So the declare option output:indent 'no'; would be quite useful.


Big thanks!




On Sat, Oct 5, 2013 at 7:09 PM, Christian Grün <christian.gruen@gmail.com> wrote:
Hi France,

you should get the desired result by adding the following line to the
beginning of your query:

  declare option output:indent 'no';

Hope this helps,
Christian

PS: I’ll try my best to answer your pending mail tomorrow.
___________________________

2013/10/5 France Baril <france.baril@architextus.com>:
> Hi,
>
> I'm getting extra spaces after a node replace.
>
> Code:
>
> let $original := <div><p>I love flowers (<specify/>).</p>
>                           <p>I love flowers: <specify/>.</p></div>
>
> let $specify := <b><i>red, yellow and white ones</i></b>
>
> let $new := copy $copy := $original
>                     modify(for $prompt in $copy//specify
>                            return replace node $prompt with $specify)
>                     return $copy
>
>
> I would expect $new to give:
>
> I love flowers (red, yellow and white ones).
>
> I love flowers: red, yellow and white ones.
>
>
> But I get extra spaces inside the parenthesis of the first sentence and
> before the period of the second sentence:
>
> I love flowers ( red, yellow and white ones ).
>
> I love flowers: red, yellow and white ones .
>
>
> You can try my .xqm on BaseX 7.7
>
> 1. Create a DB 'test' with chop white spaces to 'no'.
> 2. Run access http://localhost:8984/test-extra-spaces/test-1 from your
> browser.
> 3. Look at the .xml in the test DB. It has extra carriage return. It looks
> like the query assumed that <i> was a block and it felt compelled to add a
> carriage return and indent.
>
>
>
> --
> France Baril
> Architecte documentaire / Documentation architect
> france.baril@architextus.com
> (514) 572-0341
>
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>



--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com
(514) 572-0341