Skip to content

Commit 8d39ad3

Browse files
committed
Use the latest expath-parent dependency
1 parent 31ef25e commit 8d39ad3

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.expath</groupId>
77
<artifactId>expath-parent</artifactId>
8-
<version>1.6.2</version>
8+
<version>1.8.1</version>
99
<relativePath />
1010
</parent>
1111

src/main/java/org/expath/tools/saxon/fun/Return.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static Sequence dateTime(Calendar dt, boolean tz)
164164
if ( dt == null ) {
165165
return empty();
166166
}
167-
return new DateTimeValue(dt, tz);
167+
return DateTimeValue.fromCalendar(dt, tz);
168168
}
169169

170170
public static Sequence date(Date date)

src/main/java/org/expath/tools/saxon/fun/Types.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import net.sf.saxon.expr.StaticProperty;
1313
import net.sf.saxon.om.NamePool;
14+
import net.sf.saxon.om.NamespaceUri;
1415
import net.sf.saxon.om.StructuredQName;
1516
import net.sf.saxon.pattern.AnyNodeTest;
1617
import net.sf.saxon.pattern.NameTest;
@@ -262,7 +263,7 @@ public SequenceType severalElement(String local, Processor saxon)
262263
private SequenceType element(int occurrence, String local, Processor saxon)
263264
{
264265
final int kind = Type.ELEMENT;
265-
final String uri = myLib.getNamespace();
266+
final NamespaceUri uri = NamespaceUri.of(myLib.getNamespace());
266267
final NamePool pool = saxon.getUnderlyingConfiguration().getNamePool();
267268
final ItemType itype = new NameTest(kind, uri, local, pool);
268269
return SequenceType.makeSequenceType(itype, occurrence);

src/main/java/org/expath/tools/saxon/model/SaxonAttribute.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.expath.tools.saxon.model;
1111

1212
import net.sf.saxon.om.NodeInfo;
13+
import net.sf.saxon.str.StringView;
1314
import net.sf.saxon.trans.XPathException;
1415
import net.sf.saxon.value.AtomicValue;
1516
import net.sf.saxon.value.BooleanValue;
@@ -56,7 +57,7 @@ public boolean getBoolean()
5657
String str = myNode.getStringValue();
5758
AtomicValue val;
5859
try {
59-
val = BooleanValue.fromString(str).asAtomic();
60+
val = BooleanValue.fromString(StringView.of(str)).asAtomic();
6061
}
6162
catch ( XPathException ex ) {
6263
throw new ToolsException("Error parse the attribute value as boolean", ex);

src/main/java/org/expath/tools/saxon/model/SaxonElement.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
import java.util.Iterator;
1414
import javax.xml.namespace.QName;
1515
import net.sf.saxon.expr.XPathContext;
16-
import net.sf.saxon.om.AxisInfo;
17-
import net.sf.saxon.om.NamePool;
18-
import net.sf.saxon.om.NamespaceResolver;
19-
import net.sf.saxon.om.NodeInfo;
20-
import net.sf.saxon.om.SequenceIterator;
21-
import net.sf.saxon.om.StructuredQName;
16+
import net.sf.saxon.om.*;
2217
import net.sf.saxon.pattern.NameTest;
2318
import net.sf.saxon.pattern.NamespaceTest;
2419
import net.sf.saxon.pattern.NodeKindTest;
@@ -76,7 +71,7 @@ public String getAttribute(String local_name)
7671
{
7772
// get the attribute
7873
NamePool pool = myNode.getConfiguration().getNamePool();
79-
NodeTest pred = new NameTest(Type.ATTRIBUTE, "", local_name, pool);
74+
NodeTest pred = new NameTest(Type.ATTRIBUTE, NamespaceUri.NULL, local_name, pool);
8075
AxisIterator attrs = myNode.iterateAxis(AxisInfo.ATTRIBUTE, pred);
8176
NodeInfo a = (NodeInfo) attrs.next();
8277
// return its string value, or null if there is no such attribute
@@ -99,7 +94,7 @@ public Iterable<Attribute> attributes()
9994
public boolean hasNoNsChild()
10095
{
10196
NamePool pool = myNode.getConfiguration().getNamePool();
102-
NodeTest no_ns_pred = new NamespaceTest(pool, Type.ELEMENT, "");
97+
NodeTest no_ns_pred = new NamespaceTest(pool, Type.ELEMENT, NamespaceUri.NULL);
10398
NodeInfo next = myNode.iterateAxis(AxisInfo.CHILD, no_ns_pred).next();
10499
return next != null;
105100
}
@@ -170,7 +165,7 @@ public Iterable<Element> children()
170165
public Iterable<Element> children(String ns)
171166
{
172167
NamePool pool = myNode.getConfiguration().getNamePool();
173-
NodeTest pred = new NamespaceTest(pool, Type.ELEMENT, ns);
168+
NodeTest pred = new NamespaceTest(pool, Type.ELEMENT, NamespaceUri.of(ns));
174169
AxisIterator it = myNode.iterateAxis(AxisInfo.CHILD, pred);
175170
return new ElemIterable(it);
176171
}

0 commit comments

Comments
 (0)