[epubcheck] 01/01: Add patch to build with Saxon-HE 9.7

Eugene Zhukov eugene at moszumanska.debian.org
Tue Feb 7 07:35:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

eugene pushed a commit to branch master
in repository epubcheck.

commit 5f593715164f2dd734285d535ea3ba86326c389b
Author: Eugene Zhukov <eugene at debian.org>
Date:   Tue Feb 7 07:29:40 2017 +0000

    Add patch to build with Saxon-HE 9.7
---
 debian/patches/compatibility_with_saxon_9.7.patch | 105 ++++++++++++++++++++++
 debian/patches/series                             |   1 +
 2 files changed, 106 insertions(+)

diff --git a/debian/patches/compatibility_with_saxon_9.7.patch b/debian/patches/compatibility_with_saxon_9.7.patch
new file mode 100644
index 0000000..154ec15
--- /dev/null
+++ b/debian/patches/compatibility_with_saxon_9.7.patch
@@ -0,0 +1,105 @@
+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();
diff --git a/debian/patches/series b/debian/patches/series
index 20f9a51..db76d4a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fixed_classpath.patch
+compatibility_with_saxon_9.7.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/epubcheck.git



More information about the pkg-java-commits mailing list