Hi,
I do tests and answer but I think my answer is not passed.
In BaseX 8, the result of an xslt transformation is always indent, else
if I put the <xsl:output indent="no", the same code in 7.9 doesn't indent.
exemple :
let $p-serialization := (<output:serialization-parameters>
<output:method value='xml'/>
<output:indent value='no'/>
<output:omit-xml-declaration value='no'/>
<output:encoding value='utf-8'/
......
file:write("f1.xml",
collection("f"),$p-serialization),
file:write("f2.xml",
xslt:transform(collection("f"),"try.xsl"),$p-serialization)
with
<xsl:output encoding="UTF-8" indent="no" method="xml"/>
in try.xsl
in 8 : the f1 is space conserved, the f2.xml is indented.
in 7.9 : the f1 is space conserved, the f2 isn't indented but space not conserved
I think that it's because the file is indented before to send it to the transformer.
So at this time I have to use f1.xml and tranform it outside of BaseX.
Marc
Le 31/07/2014 00:00, Christian Grün a écrit :
Hi Marc,
We've recently worked on chopping issues in the BaseX 8.0 snapshot
[1]; some of the issues that arise due to the unfortunate default
setting of the chop flag [2] have been fixed there. Could you give it
a try?
If the problem persists, feel free to provide us with a little,
ideally self-contained example.
Best,
Christian
[1] http://files.basex.org/releases/latest/
[2] https://github.com/BaseXdb/basex/issues/913
On Wed, Jul 30, 2014 at 11:48 PM, Marc <Marc.Liste@free.fr> wrote:
> Hi,
> I want to transform with xslt before to output the file.
> If I do a serialize on the disk, runs the xslt with saxon et write the
> result the space are conserved (I use chop=false to load the file in the
> base).
> But if I transform the file in BaseX, and serialize the file after, the
> element are passed to the xslt indented and I lost the space at the
begining
> and the end of element.
>
>
> And other thing, if I put the "declare option db:chop 'false';" at the
> beginning of the XQuery, the file is indented, if I put it out (it's
> unuseful) the serialisation without indentation is done.
>
> I use the 7.9 version.