From 946f5a1949f66f9df26cf4ac381f7066567a0d4e Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Tue, 18 Jun 2024 14:52:06 +0200 Subject: [PATCH] Use the latest expath-tools dependencies which gives us Saxon 12 --- README.md | 1 + http-client-parent/pom.xml | 4 ++-- http-client-saxon/pom.xml | 6 ++---- .../main/java/org/expath/httpclient/saxon/SaxonResult.java | 4 ++-- .../org/expath/httpclient/saxon/SendRequestFunction.java | 3 ++- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 464a5dd..dab45c1 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ $ mvn clean package | http-client-saxon Version | Saxon Versions | |---------------------------|----------------| +| 1.5.0+ | 12.0+ | | 1.4.0+ | 10.3+ | | 1.3.0 | 9.9+ | | <= 1.2.4 | 9.7+ | diff --git a/http-client-parent/pom.xml b/http-client-parent/pom.xml index e766643..4bcebeb 100644 --- a/http-client-parent/pom.xml +++ b/http-client-parent/pom.xml @@ -5,7 +5,7 @@ org.expath expath-parent - 1.6.2 + 1.8.1 @@ -40,7 +40,7 @@ org.expath.tools tools-java - 0.7.0 + 0.8.0 org.apache.httpcomponents diff --git a/http-client-saxon/pom.xml b/http-client-saxon/pom.xml index 38ce448..e2dc422 100644 --- a/http-client-saxon/pom.xml +++ b/http-client-saxon/pom.xml @@ -30,7 +30,7 @@ org.expath.tools tools-saxon - 0.7.1 + 0.8.0 ${project.groupId} @@ -40,7 +40,7 @@ org.expath.packaging pkg-saxon - 1.6.1 + 2.1.0 net.sf.saxon @@ -109,8 +109,6 @@ org.apache.maven.plugins maven-resources-plugin - 3.3.1 - copy-examples diff --git a/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SaxonResult.java b/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SaxonResult.java index 54982e5..708ee96 100644 --- a/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SaxonResult.java +++ b/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SaxonResult.java @@ -127,12 +127,12 @@ public void add(HttpResponse response) public SequenceIterator newIterator() { Item[] array = myItems.toArray(new Item[0]); - return new ArrayIterator(array); + return new ArrayIterator.Of(array); } public Sequence newSequence() { - return new SequenceExtent(myItems); + return SequenceExtent.makeSequenceExtent(myItems); } private final List myItems; diff --git a/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SendRequestFunction.java b/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SendRequestFunction.java index 9bde1d3..4791d6b 100644 --- a/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SendRequestFunction.java +++ b/http-client-saxon/src/main/java/org/expath/httpclient/saxon/SendRequestFunction.java @@ -13,6 +13,7 @@ import net.sf.saxon.expr.StaticProperty; import net.sf.saxon.lib.ExtensionFunctionCall; import net.sf.saxon.om.NamePool; +import net.sf.saxon.om.NamespaceUri; import net.sf.saxon.om.StructuredQName; import net.sf.saxon.pattern.NameTest; import net.sf.saxon.pattern.NodeKindTest; @@ -86,7 +87,7 @@ public SequenceType[] getArgumentTypes() final SequenceType stype1; if (myConfig != null) { final NamePool pool = myConfig.getNamePool(); - final ItemType itype = new NameTest(Type.ELEMENT, HttpConstants.HTTP_CLIENT_NS_URI, "request", pool); + final ItemType itype = new NameTest(Type.ELEMENT, NamespaceUri.of(HttpConstants.HTTP_CLIENT_NS_URI), "request", pool); stype1 = SequenceType.makeSequenceType(itype, StaticProperty.EXACTLY_ONE); } else { stype1 = SequenceType.makeSequenceType(NodeKindTest.ELEMENT, StaticProperty.EXACTLY_ONE);