From: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Date: Mon, 29 Aug 2011 11:21:08 +0200
Subject: [PATCH] disable proprietary saxon

---
 bj/net/sf/saxon/ant/AntTransform.java    |   12 ++++++------
 bj/net/sf/saxon/s9api/SchemaManager.java |   13 ++-----------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/bj/net/sf/saxon/ant/AntTransform.java b/bj/net/sf/saxon/ant/AntTransform.java
index 5fba972..38db268 100644
--- a/bj/net/sf/saxon/ant/AntTransform.java
+++ b/bj/net/sf/saxon/ant/AntTransform.java
@@ -325,13 +325,13 @@ public class AntTransform extends MatchingTask implements XSLTLogger {
     public void execute() throws BuildException {
         log("AntTransform.execute() schema-aware=" + schemaAware + " version " + Version.getProductVersion());
 
-        if (schemaAware) {
-            // remove this line to compile the code for use under Saxon-B only
-            config = Configuration.makeSchemaAwareConfiguration(null, null);
-            config.displayLicenseMessage();
-        } else {
+//        if (schemaAware) {
+//            // remove this line to compile the code for use under Saxon-B only
+//            config = Configuration.makeSchemaAwareConfiguration(null, null);
+//            config.displayLicenseMessage();
+//        } else {
             config = new Configuration();
-        }
+//        }
 
         config.setAllowExternalFunctions(allowExtensions);
         config.setExpandAttributeDefaults(expandAttributeDefaults);
diff --git a/bj/net/sf/saxon/s9api/SchemaManager.java b/bj/net/sf/saxon/s9api/SchemaManager.java
index 9ab0b13..e62f5b8 100644
--- a/bj/net/sf/saxon/s9api/SchemaManager.java
+++ b/bj/net/sf/saxon/s9api/SchemaManager.java
@@ -96,11 +96,7 @@ public class SchemaManager {
      */
 
     public void importComponents(Source source) throws SaxonApiException {
-        try {
-            config.importComponents(source);
-        } catch (XPathException err) {
-            throw new SaxonApiException(err);
-        }
+        throw new SaxonApiException("proprietary schema support disabled in this version");
     }
 
     /**
@@ -111,12 +107,7 @@ public class SchemaManager {
      */
 
     public void exportComponents(Destination destination) throws SaxonApiException {
-        try {
-            Receiver out = destination.getReceiver(config);
-            config.exportComponents(out);
-        } catch (XPathException e) {
-            throw new SaxonApiException(e);
-        }
+        throw new SaxonApiException("proprietary schema support disabled in this version");
     }
 
 
-- 
