diff --git a/main/configure.ac b/main/configure.ac
index 759503d9096..954c09a69eb 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -4190,19 +4190,6 @@ else
fi
AC_SUBST(GPERF)
-dnl ===================================================================
-dnl Check for building stax
-dnl ===================================================================
-AC_MSG_CHECKING([whether to build the stax])
-if test -f "./stax/download/stax-1.2.0.jar"; then
- BUILD_STAX=NO
- AC_MSG_RESULT([no, will use the prebuilt stax/download/stax-1.2.0.jar])
-else
- BUILD_STAX=YES
- AC_MSG_RESULT([yes])
-fi
-AC_SUBST(BUILD_STAX)
-
dnl ===================================================================
dnl Check for building ODK
dnl ===================================================================
diff --git a/main/external_deps.lst b/main/external_deps.lst
index a5e8e36e1da..5af8665e1af 100644
--- a/main/external_deps.lst
+++ b/main/external_deps.lst
@@ -181,12 +181,6 @@ if (SOLAR_JAVA == TRUE)
URL1 = https://archive.apache.org/dist/tomcat/tomcat-5/v5.5.36/src/apache-tomcat-5.5.36-src.tar.gz
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if (SOLAR_JAVA == TRUE)
- MD5 = 980143f96b3f6ce45d2e4947da21a5e9
- name = stax-src-1.2.0.zip
- URL1 = $(OOO_EXTRAS)$(MD5)-$(name)
- URL2 = http://maven.ibiblio.org/maven/stax/jars/stax-src-1.2.0.zip
-
if (ENABLE_MEDIAWIKI == YES)
MD5 = a7983f859eafb2677d7ff386a023bc40
name = xsltml_2.1.2.zip
diff --git a/main/rat-excludes b/main/rat-excludes
index ef9a870a3bf..cc0e6fde537 100644
--- a/main/rat-excludes
+++ b/main/rat-excludes
@@ -1264,13 +1264,6 @@ test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
-##############################################################################
-#
-# files with Apache License 2.0 (ALv2)
-# that are plain copies, so they cannot be modified
-
-main/stax/download/README_stax-1.2.0.jar.txt
-
##############################################################################
#
# files with MIT license
diff --git a/main/saxon/prj/build.lst b/main/saxon/prj/build.lst
index 813097c66d9..de579a04740 100644
--- a/main/saxon/prj/build.lst
+++ b/main/saxon/prj/build.lst
@@ -1,2 +1,2 @@
-xx saxon : solenv stax NULL
+xx saxon : solenv NULL
xx saxon nmake - all xx_saxon NULL
diff --git a/main/saxon/saxon-9.0.0.7-bj.patch b/main/saxon/saxon-9.0.0.7-bj.patch
index bf2ed0fa48f..597a45126d0 100644
--- a/main/saxon/saxon-9.0.0.7-bj.patch
+++ b/main/saxon/saxon-9.0.0.7-bj.patch
@@ -57,55 +57,55 @@
+
+
+
-+
++
+
+
+
+
+
-+
++
+
+
-+
++
+
-+
-+
++
++
+
-+
-+
++
++
+
+
+
+
+
-+
++
+
+
-+
++
+
+
-+
++
+
+
+
-+
++
+
+
-+
++
+
+
-+
++
+
-+
-+
-+
++
++
++
+
-+
++
+
+
+
+
-+
++
+
++ -->
+
+
-+
++
+
+
+
@@ -125,20 +125,20 @@
+
+
+
-+
-+
-+
-+
++
++
++
++
+
+
+
-+
-+
-+
++
++
++
+
-+
-+
-+
++
++
++
+
+
+
@@ -149,12 +149,12 @@
+
+
+
-+
++
+
-+
++
+
-+
++
+
+
+
@@ -162,21 +162,21 @@
+
+
+
-+
-+
++
++ -->
++
+
+
+
-+
++
+
+
-+
++
+
+
+
@@ -187,12 +187,12 @@
+
+
+
-+
++
+
+
-+
++
+
-+
++
+
+
+
@@ -202,14 +202,14 @@
+
+
-+
-+
++
++
+
+
+
+
+
-+
++
+
+
@@ -219,15 +219,15 @@
+
+
-+
-+
-+
-+
-+
-+
-+
-+
++
++
++
++
++
++
++
++
+
+
+
@@ -236,24 +236,24 @@
+
+
+
-+
++
++ -->
+
+
++ -->
+
++ summary="yes"/>
+
+
+
@@ -279,13 +279,13 @@
+
+
+
-+ -->
++ -->
+
+
+
+
+
-+
++
+
+ -->
+
+
+
-+
++
+
-+
-+
++
++
+
+
+
+
+
++ message="com.saxonica.SchemaAwareTransformerFactory"/>
+
+ com.saxonica.jaxp.SchemaFactoryImpl
+http\://www.w3.org/2001/XMLSchema: com.saxonica.jaxp.SchemaFactoryImpl
-+
-+
++
++
+
+
+
@@ -398,7 +398,7 @@
+
+
+
-+
++
+
+
+
@@ -408,7 +408,7 @@
+
+
+
-+
++
+
+
+
+
+
-+
++
+
+
@@ -441,7 +441,7 @@
+
+
+
-+
++
+
+
+
+
+
-+
++
+
+
+
+
+
-+
++
+
+
+
@@ -495,7 +495,7 @@
+
++ -->
+
+
++ -->
+
-+
++
+
+
+
+
+
+
-+
++
+
+
+
@@ -588,21 +588,21 @@
+
+
+
-+
++
+
+
+
+
+
+
-+
++
+
+
+
+
+
+
-+
++
+
+
+
@@ -614,7 +614,7 @@
+
+
++ -->
+
+
+
@@ -622,7 +622,7 @@
+
+
+
-+
++
+
+
@@ -635,7 +635,7 @@
+
+
+
-+
++
+
++-->
+
+
+
@@ -695,8 +695,8 @@
+
+
+
-+
-+
++
++
+
+
@@ -717,7 +717,7 @@
+ %NET%\gacutil /if IKVM.Runtime.dll
+ %NET%\gacutil /if IKVM.GNU.Classpath.dll
+ %NET%\gacutil /if saxon9.dll
-+ %NET%\gacutil /if saxon9api.dll
++ %NET%\gacutil /if saxon9api.dll
+
+
+
@@ -740,10 +740,10 @@
+ set NET="%PROGRAMFILES%\Microsoft.NET\SDK\v1.1\Bin"
+ %NET%\gacutil /if IKVM.Runtime.dll
+ %NET%\gacutil /if IKVM.GNU.Classpath.dll
-+ %NET%\gacutil /if saxon9.dll
-+ %NET%\gacutil /if saxon9sa.dll
-+ %NET%\gacutil /if saxon9api.dll
-+
++ %NET%\gacutil /if saxon9.dll
++ %NET%\gacutil /if saxon9sa.dll
++ %NET%\gacutil /if saxon9api.dll
++
+
+
+
@@ -765,7 +765,7 @@
+
+
+
-+
++
+
+
@@ -791,57 +791,57 @@
+
+
+
-+
-+
++
+
+
+
-+
++
+
+
+
+
+
+
-+
-+
++
++
+
-+
-+
-+
++
++
++
+
+
-+
++
+
+
+
-+
++
+
+
+
+
+
-+
++
+
+
+
+
+
+
-+
++
+
+
+
+
+
-+
-+
-+
++
++
++
+
+
+
-+
++
+
+
+
-+
++
+
+
+
+
+
-+
-+
-+
++
++
++
+
+
+
+
-+
++
+
+
+
@@ -904,7 +904,7 @@
+
+
+
-+
++
+
+
+
-+
++
+
-+
++
+
+
+
@@ -935,11 +935,11 @@
+
+
+
-+
++
+
+
+
-+
++
+
+
+
@@ -948,7 +948,7 @@
+
+
+
-+
++
+
@@ -966,7 +966,7 @@
+
+
+
-+
++
+
+
@@ -974,7 +974,7 @@
+ description="Generate Saxon-SA for the Java platform"/>
+
+
++ description="Generate Saxon for the .NET platform"/>
+
+
@@ -990,7 +990,7 @@
+
+
+
-+
++
+
+
+
@@ -1024,8 +1024,8 @@
+
+
+
-+
-+
-+
-+
++
++
++
++
+
diff --git a/main/set_soenv.in b/main/set_soenv.in
index 1075bebb81a..b684ec6b96b 100644
--- a/main/set_soenv.in
+++ b/main/set_soenv.in
@@ -2128,7 +2128,6 @@ ToFile( "RAT_JAR_HOME", "@RAT_JAR_HOME@", "e" );
ToFile( "DMAKE_URL", "@DMAKE_URL@", "e" );
ToFile( "DMAKE_PATH", "@DMAKE_PATH@", "e" );
ToFile( "IS_SYSTEM_DMAKE", "@IS_SYSTEM_DMAKE@", "e" );
-ToFile( "BUILD_STAX", "@BUILD_STAX@", "e" );
ToFile( "BUILD_UNOWINREG", "@BUILD_UNOWINREG@", "e" );
ToFile( "USE_XINERAMA", "@USE_XINERAMA@", "e" );
ToFile( "XINERAMA_LINK", "@XINERAMA_LINK@", "e" );
diff --git a/main/stax/download/README_stax-1.2.0.jar.txt b/main/stax/download/README_stax-1.2.0.jar.txt
deleted file mode 100644
index c2f4365afba..00000000000
--- a/main/stax/download/README_stax-1.2.0.jar.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-The JSR173 is the XML pull API used at build time for the Saxon-B
-XSLT processor: it has become part of OpenJDK 6.
-
-When using an older JDK, you can get the API from
- http://dist.codehaus.org/stax/jars/
-located at the StAX Home site
- http://stax.codehaus.org/
-and put it under stax/download.
-
-1.2 Release(final) is available under the Apache License 2.0.
-
-Checksum (for reference):
-MD5 (stax-1.2.0.jar) = aa3439d235f7d999532b66bac56c1f87
diff --git a/main/stax/makefile.mk b/main/stax/makefile.mk
deleted file mode 100644
index ed5955d0e55..00000000000
--- a/main/stax/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-PRJ=.
-
-PRJNAME=stax
-TARGET=stax
-USE_JAVAVER=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : antsettings.mk
-
-.IF "$(SOLAR_JAVA)" != ""
-.IF "$(JAVANUMVER:s/.//)" >= "000100060000" || "$(JDK)"=="gcj"
-all:
- @echo "Your java version already contains StAX"
-.ENDIF # "$(JAVANUMVER:s/.//)" >= "000100060000"
-.IF "$(SYSTEM_SAXON)" == "YES"
-all:
- @echo "An already available installation of saxon should exist on your system."
- @echo "Therefore the files provided here does not need to be built in addition."
-.ENDIF
-
-.IF "$(BUILD_STAX)" != "YES"
-
-$(OUT)$/class$/stax-1.2.0.jar : $(PRJ)$/download$/stax-1.2.0.jar
- +$(COPY) $< $@
-
-.ELSE # "$(BUILD_STAX)" != "YES"
-
-# --- Files --------------------------------------------------------
-TARFILE_NAME=stax-src-1.2.0
-TARFILE_MD5=980143f96b3f6ce45d2e4947da21a5e9
-TARFILE_ROOTDIR=src
-
-# $(JAVA_TARGET_FLAG) pins bytecode to the Java 8 floor (settings.mk); this raw
-# javac call would otherwise emit bytecode for whatever the build JDK defaults to.
-BUILD_ACTION=$(JAVAC) $(JAVA_TARGET_FLAG) javax$/xml$/stream$/*.java && jar -cf stax-1.2.0.jar javax$/xml$/stream$/*.class javax$/xml$/stream$/events$/*.class javax$/xml$/stream$/util$/*.class
-
-OUT2CLASS=stax-1.2.0.jar
-.ENDIF # "$(BUILD_STAX)" != "YES"
-
-.ELSE # $(SOLAR_JAVA)!= ""
-nojava:
- @echo "Not building $(PRJNAME) because Java is disabled"
-.ENDIF # $(SOLAR_JAVA)!= ""
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.IF "$(SOLAR_JAVA)" != ""
-.INCLUDE : tg_ext.mk
-.ENDIF
diff --git a/main/stax/prj/build.lst b/main/stax/prj/build.lst
deleted file mode 100644
index cbfc6ea3ba6..00000000000
--- a/main/stax/prj/build.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-tx stax : solenv NULL
-tx stax nmake - all tx_stax NULL
diff --git a/main/stax/prj/d.lst b/main/stax/prj/d.lst
deleted file mode 100644
index 4345d5b8844..00000000000
--- a/main/stax/prj/d.lst
+++ /dev/null
@@ -1 +0,0 @@
-..\%__SRC%\class\stax*.jar %_DEST%\bin%_EXT%