Created attachment 175972 [details] Example exposing the error Debian bullseye with LibreOffice 7.2.2 from backports. Trying to convert a document containing list with line break leads to error With unoconv: ``` # /usr/bin/python3 /usr/local/bin/unoconv -f xhtml -o /tmp/test.xhtml list-with-line-break.odt XSL Vendor: 'libxslt' xmlXPathCompOpEval: function replace not found XPath error : Unregistered function runtime error: file file:///usr/lib/libreoffice/share/xslt/export/common/body.xsl line 109 element value-of XPath evaluation returned no result. unoconv: UnoException during export phase: Unable to store document to file:///tmp/test.html (Error (com.sun.star.io.IOException){ (com.sun.star.uno.Exception){ Message = (string)"SfxBaseModel::impl_store <file:///tmp/test.html> failed: 0xc10(Error Area:Io Class:Write Code:16) ./sfx2/source/doc/sfxbasemodel.cxx:3180 ./sfx2/source/doc/sfxbasemodel.cxx:1762", Context = (com.sun.star.uno.XInterface)0x0{} } }) Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"XHTML Writer File" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x22c6a58{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }) ``` With LibreOffice directly: ``` # libreoffice --convert-to "html:XHTML Writer File:UTF8" --outdir /tmp/ list-with-line-break.odt convert /tmp/list-with-line-break.odt -> /tmp/list-with-line-break.html using filter : XHTML Writer File:UTF8 XSL Vendor: 'libxslt' xmlXPathCompOpEval: function replace not found XPath error : Unregistered function runtime error: file file:///usr/lib/libreoffice/share/xslt/export/common/body.xsl line 109 element value-of XPath evaluation returned no result. Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp/list-with-line-break.html> failed: 0xc10(Error Area:Io Class:Write Code:16) ./sfx2/source/doc/sfxbasemodel.cxx:3180 ./sfx2/source/doc/sfxbasemodel.cxx:1762) ``` If https://git.libreoffice.org/core/+/3eb870f0843a00042ca7dd89837fbe0cc6f918c2%5E%21/#F0 is reverted, everything is fine: ``` # sed -i "s/replace(\$listIndent, ',', '.')/\$listIndent/" /usr/lib/libreoffice/share/xslt/export/common/body.xsl # /usr/bin/python3 /usr/local/bin/unoconv -f xhtml -o /tmp/test.xhtml list-with-line-break.odt XSL Vendor: 'libxslt' # libreoffice --convert-to "html:XHTML Writer File:UTF8" --outdir /tmp/ list-with-line-break.odt convert /tmp/list-with-line-break.odt -> /tmp/list-with-line-break.html using filter : XHTML Writer File:UTF8 XSL Vendor: 'libxslt' ```
Also confirmed in a build of master from 27 October: Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: ad0b383cbe9ef7d3bc85451c8355d1139942683b CPU threads: 12; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: CL @Noel, any comment on this?
Does it work if you change the replace to translate ?
It works but I tested en locale only.
Reproduced in Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: 97583efeb2e2d21b501b52ba6be2442e955bdec3 CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded marking as regression
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6c747ccf6cbfe0dc5d591f8ce68a1ca6c63cde53 tdf#145361 fix XSLT for older libxslt It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/c10bfb4c582c13a294c1689ed7f9256b24d22075 tdf#145361 fix XSLT for older libxslt It will be available in 7.2.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7ab9d4caddcf3e2b4e1f5541ebd85f4559bff615 tdf#145361: sw_xhtmlexport: Add unittest It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.