My understanding is that it only affects database documents, and I used file input.

Nevertheless, I also tried option -w, but always got the same result.

Kind regards,
Hans-Jürgen



Hans-Juergen Rennau <hrennau@yahoo.de> schrieb am 17:45 Donnerstag, 20.März 2014:
Dear Dirk, thank you.

But this is strange - I ran the query using a file as input - not a database document.

I tried two versions:
   BaseX 7.8.2 beta f505185 [Standalone]
   BaseX 8.0 beta 606f18b [Standalone]

OS is Windows 7.

I always get this result:
<para>xxx<emphasis role="italic">abc</emphasis>yyy.</para>

Using a different XQuery processor, I get this result, as expected:
<para>xxx    <emphasis role="italic">abc</emphasis> yyy.</para>

Kind regards,
Hans-Jürgen



Dirk Kirsten <dk@basex.org> schrieb am 17:10 Donnerstag, 20.März 2014:
Dear Hans-Jürgen,

When running local:edit() on an in-memory node I get the expected and
correct result, including whitespaces.

I guess that you run this command on a database node and the XML
documents were parsed with CHOP being true (which is the default), this
would explain the behavior and would be as expected. If you do not want
this you might consider setting the CHOP option (see
https://docs.basex.org/wiki/Options#CHOP) to false.

Cheers,
Dirk

On 20/03/14 16:57, Hans-Juergen Rennau wrote:
> Dear BaseX team,
>
> I think I observed a bug concerning trailing whitespace in text nodes.
>
> Please consider this input document:
>
> <para>xxx    <emphasis role="italic">abc</emphasis> yyy.</para>
>
>
> [Note the blanks between xxx and <emphasis>.]
>
> The result of the following "null-transformation"
>
> =======================
>
> declare function local:edit($n as node())
>        as node()? {
>    typeswitch($n)
>    case document-node() return
>        document {for $c in $n/node() return local:edit($c)}
>    case element() return
>        element {node-name($n)}
>            {for $ac in $n/(@*, node()) return local:edit($ac)}
>    default return $n
> };
> local:edit(.)
> =======================
>
> should be identical, but what I get is this:
>
> <para>xxx<emphasis role="italic">abc</emphasis>yyy.</para>
>
> The blanks after "xxx" are gone!
>
>
> When transforming mixed content like docbook, this can have awkware consequences.
>
> Kind regards,
> Hans-Jürgen

>
>
>
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>

--
Dirk Kirsten, BaseX GmbH, http://basex.org
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|  Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk