Re: [basex-talk] xml element beginning and end space loss

2018-01-26 Thread Imsieke, Gerrit, le-tex

Hi Stefania,

You can avoid it if you create the DB with chopping switched off in the 
first place.


Or you can supply the chopping option as you go:

db:replace('MyDB', 'doc.xml', ' stefy ', map {'chop':false()})

Whitespace chooping by default is maybe the most-detested design 
decision in BaseX, at least among users of mixed content.


Luckily you can switch it off.

Gerrit


On 27/01/2018 00:53, Stefania Axo wrote:

Hi all!

is there a way to preserve the beginning and ending spaces in the 
Database xml elements?



In other words If I execute this xQuery

            db:replace("MyDB", "doc.xml", "  stefy  ")


the resulted document will be

           stefy

As you can see I lost my beginner and ending spaces.


thanks
Stefania


--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsi...@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt


[basex-talk] xml element beginning and end space loss

2018-01-26 Thread Stefania Axo
Hi all!

is there a way to preserve the beginning and ending spaces in the Database 
xml elements?


In other words If I execute this xQuery

   db:replace("MyDB", "doc.xml", "  stefy  ")


the resulted document will be 

  stefy

As you can see I lost my beginner and ending spaces.


thanks
Stefania