File: xdoc-suppress-XSLT-processing-limits.patch

package info (click to toggle)
starjava-ttools 3.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,000 kB
  • sloc: java: 170,407; xml: 19,593; javascript: 670; python: 641; sh: 107; makefile: 29
file content (54 lines) | stat: -rw-r--r-- 2,704 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Mark Taylor <m.b.taylor@bristol.ac.uk>
Date: Fri, 19 Sep 2025 08:53:28 +0100
Subject: xdoc: suppress XSLT processing limits

At JDK 25 the XSLT processing done by xerces, used by the XDOC package
to generate the HTML versions of the stilts and topcat user documents,
seems to have some built in limits for entity size and count etc,
which means that downconversions fail at build time and test time
for these large XML documents.  This didn't happen at JDK 21.
Add some system properties that take action to unset these limitations.

Origin: backport, https://github.com/Starlink/starjava/commit/bf0aa55044fa8ac8aa898cf2079f9d471d0ab8f6
Closes: #1128176
---
 build.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build.xml b/build.xml
index 1d79183..9d15dae 100644
--- a/build.xml
+++ b/build.xml
@@ -1470,6 +1470,10 @@
           dir="${build.docs}"
 	  fork="yes">
       <sysproperty key="java.awt.headless" value="true"/>
+      <sysproperty key="jdk.xml.totalEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.maxGeneralEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.entityReplacementLimit" value="0"/>
+      <sysproperty key="jdk.xml.enableExtensionFunctions" value="true"/>
     </java>
     <mkdir dir="${build.dir}/bash-completion"/>
     <java classpathref="classpath"
@@ -1757,6 +1761,10 @@
                    value="${tests-classpath.value}"/>
       <sysproperty key="java.library.path" value="${tests-libpath}"/>
       <sysproperty key="java.awt.headless" value="${java.awt.headless}"/>
+      <sysproperty key="jdk.xml.totalEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.maxGeneralEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.entityReplacementLimit" value="0"/>
+      <sysproperty key="jdk.xml.enableExtensionFunctions" value="true"/>
       <sysproperty key="tests.withnet" value="${tests.withnet}"/>
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="xdoc.etc" value="${xdoc.etc}"/>
@@ -1822,6 +1830,10 @@
                    value="${tests-classpath.value}"/>
       <sysproperty key="java.library.path" value="${tests-libpath}"/>
       <sysproperty key="java.awt.headless" value="${java.awt.headless}"/>
+      <sysproperty key="jdk.xml.totalEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.maxGeneralEntitySizeLimit" value="0"/>
+      <sysproperty key="jdk.xml.entityReplacementLimit" value="0"/>
+      <sysproperty key="jdk.xml.enableExtensionFunctions" value="true"/>
       <sysproperty key="tests.withnet" value="${tests.withnet}"/>
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="xdoc.etc" value="${xdoc.etc}"/>