Christian,
thanks for the hint, but no change for the better. I also tried with the basex-internal xslt-processor (instead of saxon) but resulted in the same problem.
Any ideas welcome...
Greets, Simon
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Freitag, 26. Juli 2013 14:56 An: Simon Görke Cc: BaseX Betreff: Re: [basex-talk] losing line breaks with xslt:transform(...)
Hi Simon,
not sure if that helps, but you can try to deactivate whitespace chopping in the prolog of your XQuery expression:
declare option db:chop "no"; ...
Best, Christian ___________________________
2013/7/26 Simon Görke simon.goerke@ils.uni-stuttgart.de:
Hi,
I have small issue regarding the xslt:transform function (or what lies beneath). We are currently migrating a larger number of existing stylesheets into a basex-environment (before they were used with saxon on the filesystem).
The problem is, that all line breaks which are generated explicitly in the stylesheets (e.g. by using xsl:text
</xsl:text>) get lost. Line feeds within a xsl:text element are correctly transformed. See below for the xslt and example output.
First we thought this might be linked to the whitespace chopping of the database where the transformation result is stored, however I get the same behavior when directly looking at the output of xslt:transform(...) in the basex-gui. Is there any options to influence this behavior? We are using saxon9 within basex version 7.6.
Thanks for your help Simon
Excerpt from example stylesheet: ...
<Document> <xsl:text> block1 line1 block1 line2 </xsl:text>
xsl:text
</xsl:text> xsl:textblock2 line1</xsl:text> xsl:text
</xsl:text> xsl:textblock2 line2</xsl:text>
xsl:text </xsl:text>
xsl:textblock3 line1</xsl:text>
xsl:text </xsl:text>
xsl:textblock3 line2</xsl:text>
</Document> ....
Result when running the stylesheet with saxon on the filesystem; All line break variants actually result in new lines:
<Document> block1 zeile1 block1 zeile2 block2 zeile1 block2 zeile1 block3 zeile1 block3 zeile1 </Document> ----------------------------------
Result from calling xslt:transform in basex (saxon is used also within basex); Only the line break within the xsl:text is visible in the output:
<Document> block1 line1 block1 line2block2 line1block2 line2block3 line1block3 line2 </Document> ----------------------------------
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi Simon,
could you provide us with a minimized example that demonstrates the (mis)behavior?
Thanks in advance Christian ___________________________
2013/7/30 Simon Görke simon.goerke@ils.uni-stuttgart.de:
Christian,
thanks for the hint, but no change for the better. I also tried with the basex-internal xslt-processor (instead of saxon) but resulted in the same problem.
Any ideas welcome...
Greets, Simon
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Freitag, 26. Juli 2013 14:56 An: Simon Görke Cc: BaseX Betreff: Re: [basex-talk] losing line breaks with xslt:transform(...)
Hi Simon,
not sure if that helps, but you can try to deactivate whitespace chopping in the prolog of your XQuery expression:
declare option db:chop "no"; ...
Best, Christian ___________________________
2013/7/26 Simon Görke simon.goerke@ils.uni-stuttgart.de:
Hi,
I have small issue regarding the xslt:transform function (or what lies beneath). We are currently migrating a larger number of existing stylesheets into a basex-environment (before they were used with saxon on the filesystem).
The problem is, that all line breaks which are generated explicitly in the stylesheets (e.g. by using xsl:text
</xsl:text>) get lost. Line feeds within a xsl:text element are correctly transformed. See below for the xslt and example output.
First we thought this might be linked to the whitespace chopping of the database where the transformation result is stored, however I get the same behavior when directly looking at the output of xslt:transform(...) in the basex-gui. Is there any options to influence this behavior? We are using saxon9 within basex version 7.6.
Thanks for your help Simon
Excerpt from example stylesheet: ...
<Document> <xsl:text> block1 line1 block1 line2 </xsl:text>
xsl:text
</xsl:text> xsl:textblock2 line1</xsl:text> xsl:text
</xsl:text> xsl:textblock2 line2</xsl:text>
xsl:text </xsl:text>
xsl:textblock3 line1</xsl:text>
xsl:text </xsl:text>
xsl:textblock3 line2</xsl:text>
</Document> ....
Result when running the stylesheet with saxon on the filesystem; All line break variants actually result in new lines:
<Document> block1 zeile1 block1 zeile2 block2 zeile1 block2 zeile1 block3 zeile1 block3 zeile1 </Document> ----------------------------------
Result from calling xslt:transform in basex (saxon is used also within basex); Only the line break within the xsl:text is visible in the output:
<Document> block1 line1 block1 line2block2 line1block2 line2block3 line1block3 line2 </Document> ----------------------------------
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de