Description: Compatibility with Saxon-HE 9.7.0.10
 The patch is taken from the mentioned origin plus modified to use
 Saxon-HE 9.7.0.10 everywhere.
Origin: https://github.com/IDPF/epubcheck/commit/21cd661a19b58084175c97cb0e46ffd38ff23c58

--- a/pom.xml
+++ b/pom.xml
@@ -159,7 +159,7 @@
         <dependency>
             <groupId>net.sf.saxon</groupId>
             <artifactId>Saxon-HE</artifactId>
-            <version>9.5.1-5</version>
+            <version>9.7.0-10</version>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
@@ -372,7 +372,7 @@
                     <dependency>
                         <groupId>net.sf.saxon</groupId>
                         <artifactId>Saxon-HE</artifactId>
-                        <version>9.4</version>
+                        <version>9.7.0-10</version>
                     </dependency>
                 </dependencies>
             </plugin>
--- a/src/main/java/com/adobe/epubcheck/vocab/PrefixDeclarationParser.java
+++ b/src/main/java/com/adobe/epubcheck/vocab/PrefixDeclarationParser.java
@@ -9,7 +9,7 @@ import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
 
-import net.sf.saxon.om.Name10Checker;
+import net.sf.saxon.om.NameChecker;
 
 import com.adobe.epubcheck.api.EPUBLocation;
 import com.adobe.epubcheck.api.Report;
@@ -102,7 +102,7 @@ public class PrefixDeclarationParser
           {
             // empty prefix
             report.message(MessageId.OPF_004a, location);
-          } else if (!Name10Checker.getInstance().isValidNCName(chars))
+          } else if (!NameChecker.isValidNCName(chars))
           {
             // bad prefix
             report.message(MessageId.OPF_004b, location, chars);
--- a/src/main/java/com/adobe/epubcheck/xml/XMLValidator.java
+++ b/src/main/java/com/adobe/epubcheck/xml/XMLValidator.java
@@ -56,6 +56,9 @@ import net.sf.saxon.Configuration;
 import net.sf.saxon.TransformerFactoryImpl;
 import net.sf.saxon.sxpath.IndependentContext;
 import net.sf.saxon.sxpath.XPathStaticContext;
+import net.sf.saxon.trans.SymbolicName;
+import net.sf.saxon.om.StandardNames;
+
 
 public class XMLValidator
 {
@@ -171,19 +174,22 @@ public class XMLValidator
     public void initTransformerFactory(TransformerFactory factory)
     {
       super.initTransformerFactory(factory);
+      SymbolicName lineNumberFn = new SymbolicName(StandardNames.XSL_FUNCTION, LineNumberFunction.QNAME, 0);
+      SymbolicName columnNumberFn = new SymbolicName(StandardNames.XSL_FUNCTION, ColumnNumberFunction.QNAME, 0);
+      SymbolicName systemIdFn = new SymbolicName(StandardNames.XSL_FUNCTION, SystemIdFunction.QNAME, 0);
       if (factory instanceof TransformerFactoryImpl)
       {
         Configuration configuration = ((TransformerFactoryImpl) factory).getConfiguration();
         XPathStaticContext xpathContext = new IndependentContext(configuration);
-        if (!xpathContext.getFunctionLibrary().isAvailable(LineNumberFunction.QNAME, -1))
+        if (!xpathContext.getFunctionLibrary().isAvailable(lineNumberFn))
         {
           configuration.registerExtensionFunction(new LineNumberFunction());
         }
-        if (!xpathContext.getFunctionLibrary().isAvailable(ColumnNumberFunction.QNAME, -1))
+        if (!xpathContext.getFunctionLibrary().isAvailable(columnNumberFn))
         {
           configuration.registerExtensionFunction(new ColumnNumberFunction());
         }
-        if (!xpathContext.getFunctionLibrary().isAvailable(SystemIdFunction.QNAME, -1))
+        if (!xpathContext.getFunctionLibrary().isAvailable(systemIdFn))
         {
           configuration.registerExtensionFunction(new SystemIdFunction());
         }
--- a/src/main/java/org/idpf/epubcheck/util/saxon/Int64ValueSequence.java
+++ b/src/main/java/org/idpf/epubcheck/util/saxon/Int64ValueSequence.java
@@ -21,7 +21,7 @@ class Int64ValueSequence implements Sequ
   }
 
   @Override
-  public SequenceIterator<? extends Item> iterate() throws
+  public SequenceIterator iterate() throws
       XPathException
   {
     return item.iterate();
--- a/src/main/java/org/idpf/epubcheck/util/saxon/SystemIdFunction.java
+++ b/src/main/java/org/idpf/epubcheck/util/saxon/SystemIdFunction.java
@@ -94,7 +94,7 @@ public class SystemIdFunction extends Ex
     }
 
     @Override
-    public SequenceIterator<? extends Item> iterate() throws
+    public SequenceIterator iterate() throws
         XPathException
     {
       return item.iterate();
