diff --git a/Makefile.am b/Makefile.am
index 5cdb21e69..1b6c8fdb1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,15 @@ if DIST_DEBIAN
DAPS_CATALOG_TEMPLATE := etc/catalog.debian
endif
+#------------------------
+# Saxon
+SAXON_CONFIG := etc/saxon/saxon.conf
+if HAS_SAXON
+ SAXON_CONFIG_SRC := etc/saxon/saxon${SAXON_VERSION}.conf
+else
+ SAXON_CONFIG_SRC := etc/saxon/saxon10.conf
+endif
+
# stylesheets
if HAS_DAPS_XSL
STYLEROOT := $(daps_xsl)
@@ -106,6 +115,7 @@ dapsconfdir = @sysconfdir@/daps
fopconfdir = $(dapsconfdir)/fop
xepconfdir = $(dapsconfdir)/xep
hyphendir = $(xepconfdir)/hyphen
+saxondir = $(dapsconfdir)/saxon
catalogdir = @sysconfdir@/xml/catalog.d
@@ -152,6 +162,8 @@ dist_hyphen_DATA = $(wildcard etc/xep/hyphen/*.tex) \
$(wildcard etc/xep/hyphen/*.il2)
# BASH completion
dist_bashcompletion_DATA = bash_completion/daps
+# Saxon config file
+dist_saxon_DATA = etc/saxon/saxon${SAXON_VERSION}.conf
# DATA
if !CATALOG_EDIT
@@ -304,6 +316,10 @@ $(FOP_CONFIG): $(FOP_CONFIG_SRC) $(FOP_CONFIG_DEFAULT) $(FIRSTBUILD)
ln -sf $(notdir $(FOP_CONFIG_DEFAULT)) $@; \
fi
+
+$(SAXON_CONFIG): $(SAXON_CONFIG_SRC) $(FIRSTBUILD)
+
+
# Create the Jing Wrapper. Debian and Ubuntu require a special version
# (see JING_WRAPPER definitions above)
$(JING_WRAPPER): $(JING_WRAPPER_SRC) $(JING_WRAPPER_DEFAULT) $(FIRSTBUILD)
diff --git a/Makefile.in b/Makefile.in
index 08454c295..66edf3270 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -349,6 +349,8 @@ PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
Q = @Q@
REMAKE = @REMAKE@
+SAXON = @SAXON@
+SAXON_VERSION = @SAXON_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
diff --git a/configure.ac b/configure.ac
index 0ba54ec36..6fd1e9f0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,6 +171,21 @@ if test 0 = "$CATALOG"; then
AC_MSG_ERROR([Catalog $root_catalog not found])
fi
+dnl -------------------------------------------------------------------------
+dnl It checks for each saxon major release, prioritizing saxon12
+AC_MSG_NOTICE([===== Checking for Saxon...])
+AC_PATH_PROGS([SAXON], [saxon12 saxon11 saxon10], [0])
+if test 0 = "$SAXON"; then
+ AC_MSG_WARN([saxon10, saxon11, nor saxon12 found])
+else
+ dnl Set saxon version
+ SAXON_VERSION=${SAXON##*saxon}
+ AC_MSG_NOTICE([Found saxon version $SAXON_VERSION])
+ AC_SUBST(SAXON_VERSION)
+fi
+
+AM_CONDITIONAL([HAS_SAXON], [test 0 != $SAXON])
+
dnl -------------------------------------------------------------------------
AC_MSG_NOTICE([===== Checking for Image conversion tools...])
@@ -451,6 +466,14 @@ Feature | Enabled | Action to enable
test 0 = "$HAVE_DOCBOOK_5_STYLESHEETS" && DB5=0
test 0 = "$HAVE_JING" && DB5=0
+dnl Saxon
+if test 0 = "$SAXON"; then
+ AC_MSG_RESULT([Saxon support | no | install saxon10, saxon11, or
+ | | saxon12])
+else
+ AC_MSG_RESULT([Saxon support | yes | (will use $SAXON)])
+fi
+
dnl DocBook 5
if test 0 = "$HAVE_DOCBOOK_50"; then
AC_MSG_RESULT([DocBook 5.0 support | no | install DocBook 5.0, the
diff --git a/etc/saxon/saxon10.conf b/etc/saxon/saxon10.conf
new file mode 100644
index 000000000..215222381
--- /dev/null
+++ b/etc/saxon/saxon10.conf
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ net.sf.saxon.option.xom.XOMObjectModel
+ s9apitest.TestIntegrationFunctions$SqrtFunction
+
+ file:///c:/MyJava/samples/data/books.xsd
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/etc/saxon/saxon11.conf b/etc/saxon/saxon11.conf
new file mode 100644
index 000000000..43c3925d3
--- /dev/null
+++ b/etc/saxon/saxon11.conf
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ net.sf.saxon.option.xom.XOMObjectModel
+ s9apitest.TestIntegrationFunctions$SqrtFunction
+
+ file:///c:/MyJava/samples/data/books.xsd
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/etc/saxon/saxon12.conf b/etc/saxon/saxon12.conf
new file mode 100644
index 000000000..487300f45
--- /dev/null
+++ b/etc/saxon/saxon12.conf
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ net.sf.saxon.option.xom.XOMObjectModel
+ s9apitest.TestIntegrationFunctions$SqrtFunction
+
+ file:///c:/MyJava/samples/data/books.xsd
+
+
+
+
+
+
+
+
+
+