[Libreoffice] Writer : XSLT 2.0 Filters KO in LibreOffice 3.4.3 but OK in 3.3.4

arnaud.malguy at arkarell.com arnaud.malguy at arkarell.com
Mon Oct 3 07:16:07 PDT 2011


​​Hi all,
 
I wrote XSLT 2.0 filters that works fine in LibreOffice 3.3.4 but doesn't work
in 3.4.3 version.
It's because between these two verions, a libxslt implementation of XSLTFilter
has been added and set to default instead of java-saxon implementation. And
libxslt doesn't support XSLT 2.0
 
I found a way to use other implementation (old java-saon) than defaut libxslt in
the following changelog :

 2011-02-04  Peter Jentsch  <pjotr at guineapics.de> 
[cd9e87a248022a6a5b2f8fcd6dc5fca7432b7b38]

  Update of the libxslt based xsltfilter implementation.

  * Uses the sax document handler adapter
  * Uses libxslt by default
  * Tries to evaluate the 2nd userdata parameter of the filter configuration as
    the name of the transformation service to use.  This should allow extension
    authors to provide their own transformer implementation (which then could
use
    the old java based transformation service which in turn uses saxon and could
    provide xslt 2.0 for the TEI people for example).
​
After reading code of XSLTFilter.cxx of 3.4.3 version, I assume that the 2nd
userdata parameter of the filter configuration is defined in the
TypeDetection.xcu file of a XSLT Filter package. And more precisly after the
first semi-colon of the text contained in the
node/oor:component-data/node[@oor:name='Filters']/node[@oor:name='Test XSLT 2.0
filter']/prop[@oor:name="Data"]/value.
 
So I tried this :

Create a new import xml filter
Load my xslt
Export this filter as a package
Update the TypeDetection.xcu in the package to set the java implementation.
I thougt that the good value for java implementation is
"com.sun.star.comp.JAXTHelper" as in 3.3.4 version of LibreOffice.
But it doesn't work. Then I tried these differents values :
com.sun.star.comp.JAXTHelper
com.sun.star.comp.documentconversion.XSLTFilter
com.sun.star.comp.documentconversion.XSLTransformer





Butnothing worked. I join these differents test packages and the input test xml
file.


Doesanyone knowthe solution ?

Thanks
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-xslt-filter-standard.jar
Type: application/java-archive
Size: 9340 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment-0004.jar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-xslt-filter-JAXTHelper.jar
Type: application/java-archive
Size: 9342 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment-0005.jar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-xslt-filter-XSLTFilter.jar
Type: application/java-archive
Size: 9334 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment-0006.jar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-xslt-filter-XSLTransformer.jar
Type: application/java-archive
Size: 9342 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment-0007.jar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestXSLTFilter.xml
Type: text/xml
Size: 46 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111003/274f0f0d/attachment-0001.bin>


More information about the LibreOffice mailing list