* Bug #8373 fixed - clear() can now take a matrix of strings argument.
+* Bug #8479 fixed - the latest Saxon version was not supported.
+
* Bug #8511 fixed - sprand used rand and grand functions, and internal state of the random
generator was changed.
)
for dir in $with_docbook $SCI_SRCDIR_FULL/thirdparty/docbook/ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/docbook2X/xslt/man/ /usr/share/xml/docbook/stylesheet/nwalsh/ /usr/share/xml/docbook/stylesheet/nwalsh/current/ /sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/xsl-stylesheets-*/ /usr/share/sgml/docbook/xsl-stylesheets-*/ /usr/share/sgml/docbook/xsl-stylesheets /usr/share/sgml/docbook/xsl-ns-stylesheets-*/; do
- if test -r "$dir/javahelp/javahelp.xsl" -a "$DOCBOOK_ROOT" = ""; then
+ if test -r "$dir/fo/docbook.xsl" -a "$DOCBOOK_ROOT" = ""; then
DOCBOOK_ROOT=$dir
fi
done
if test -z "$DOCBOOK_ROOT"; then
AC_MSG_ERROR([Could not find the Docbook root directory. If you have installed it on your system and we haven't been able to find it. Please report a bug])
fi
+ AC_SUBST(DOCBOOK_ROOT)
# Saxon XSLT Processor, as the JVM implementation is unable to parse the docbook xsl files
- AC_JAVA_CHECK_PACKAGE([saxon],[com.icl.saxon.Loader],[Saxon XSLT Processor])
+ # check Saxon-HE 9.5 first then fallback to Saxon-6.5
+ AC_JAVA_CHECK_PACKAGE([saxon9he],[net.sf.saxon.Version],[Saxon XSLT Processor],"yes")
SAXON=$PACKAGE_JAR_FILE
+ if test -z "$SAXON"; then
+ AC_JAVA_CHECK_PACKAGE([saxon],[net.sf.saxon.Version],[Saxon XSLT Processor],"yes")
+ SAXON=$PACKAGE_JAR_FILE
+ fi
+ if test -z "$SAXON"; then
+ AC_JAVA_CHECK_PACKAGE([saxon],[com.icl.saxon.Loader],[Saxon XSLT Processor])
+ SAXON=$PACKAGE_JAR_FILE
+ fi
AC_SUBST(SAXON)
-AC_SUBST(DOCBOOK_ROOT)
-
])
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
final StreamSource xmlSource = new StreamSource(new File(sourceDocProcessed));
- final TransformerFactory tfactory = TransformerFactory.newInstance();
+ /*
+ * We rely on the saxon implementation to compile xsl files (the default JVM implementation failed).
+ *
+ * Supported version :
+ * * Saxon-HE 9.5 (and may be 8.x too) which handle xinclude, XSLT-2 and has better performances
+ * * Saxon 6.5 if on the classpath
+ * * JVM Apache-xerces as a fallback but may probably fail to compile docbook.xsl
+ */
+ TransformerFactory tfactory;
+ try {
+ tfactory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", null);
+ } catch (TransformerFactoryConfigurationError e) {
+ // switch back to the default implementation which may be saxon 6.5 if found on the classpath or the JVM default implementation otherwise
+ tfactory = TransformerFactory.newInstance();
+ }
+
final Transformer transform = tfactory.newTransformer(new StreamSource(new File(path)));
transform.setParameter("base.dir", this.outputDirectory);