<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head>
<body>
<p>
​​Hi all,
<br/>
 
<br/>
I wrote XSLT 2.0 filters that works fine in LibreOffice 3.3.4 but doesn't work in 3.4.3 version.
</p>
<p>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</p>
<p> </p>
<p>I found a way to use other implementation (old java-saon) than defaut libxslt in the following changelog :</p>
<p>
<br/>
<em> 2011-02-04  Peter Jentsch  <pjotr@guineapics.de>  [cd9e87a248022a6a5b2f8fcd6dc5fca7432b7b38]</em>
<br/>
<br/>
<em>  Update of the libxslt based xsltfilter implementation.</em>
<br/>
<br/>
<em>  * Uses the sax document handler adapter</em>
<br/>
<em>  * Uses libxslt by default</em>
<br/>
<em>  * Tries to evaluate the 2nd userdata parameter of the filter configuration as</em>
<br/>
<em>    the name of the transformation service to use.  This should allow extension</em>
<br/>
<em>    authors to provide their own transformer implementation (which then could use</em>
<br/>
<em>    the old java based transformation service which in turn uses saxon and could</em>
<br/>
<em>    provide xslt 2.0 for the TEI people for example).</em>
<br/>
<em>​</em>
<br/>
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
<em>/oor:component-data/node[@oor:name='Filters']/node[@oor:name='Test XSLT 2.0 filter']/prop[@oor:name="Data"]/value.</em>
</p>
<p> </p>
<p>So I tried this :</p>
<ul>
<li>Create a new import xml filter</li>
<li>Load my xslt</li>
<li>Export this filter as a package</li>
<li>
Update the TypeDetection.xcu in the package to set the java implementation.
<br/>
I thougt that the good value for java implementation is "com.sun.star.comp.JAXTHelper" as in 3.3.4 version of LibreOffice.
<br/>
But it doesn't work. Then I tried these differents values :
<ul>
<li>com.sun.star.comp.JAXTHelper</li>
<li>com.sun.star.comp.documentconversion.XSLTFilter</li>
<li>com.sun.star.comp.documentconversion.XSLTransformer</li>
</ul>
</li>
</ul>
<div id="gt-res-content" class="almost_half_cell">
<div dir="ltr">
<span class="short_text">
<span class="hps">But</span>
<span class="hps">nothing worked</span>
<span>
. I join these differents test packages and the input test xml file.
<br/>
</span>
</span>
</div>
<div dir="ltr">
<span class="short_text">
<span>
<br/>
</span>
</span>
</div>
</div>
<p>
<span class="short_text">
<span class="hps">Does</span>
<span class="hps">anyone know</span>
<span class="hps">
the solution ?
<br/>
</span>
</span>
</p>
<p>Thanks</p>
<p> </p>
</body>
</html>