summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3/modules/databinding-saxon/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-06-24 14:34:56 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-06-24 14:34:56 +0000
commitd4cb1f400fa91e1804e29c0f8285d9bccaf30bc7 (patch)
treefed2fa072275033f50a0451b6aefb8ec5a2f2faa /branches/sca-java-1.3/modules/databinding-saxon/src
parent5b516e4c4d0187d64515b45e842c82866510907a (diff)
TUSCANY-2427 move back to saxon 8.7
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@671193 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3/modules/databinding-saxon/src')
-rw-r--r--branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Node2NodeInfoTransformer.java10
-rw-r--r--branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/NodeInfo2NodeTransformer.java2
-rw-r--r--branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/SimpleType2ValueTransformer.java10
-rw-r--r--branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2ObjectTransformer.java2
-rw-r--r--branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2SimpleTypeTransformer.java2
5 files changed, 15 insertions, 11 deletions
diff --git a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Node2NodeInfoTransformer.java b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Node2NodeInfoTransformer.java
index 182c7e29d9..fabadd34ea 100644
--- a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Node2NodeInfoTransformer.java
+++ b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Node2NodeInfoTransformer.java
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.databinding.saxon;
import javax.xml.transform.dom.DOMSource;
import net.sf.saxon.Configuration;
+import net.sf.saxon.event.Builder;
import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.trans.XPathException;
@@ -42,13 +43,16 @@ import org.w3c.dom.Node;
public class Node2NodeInfoTransformer extends BaseTransformer<Node, NodeInfo> implements
PullTransformer<Node, NodeInfo> {
- public NodeInfo transform(Node source, TransformationContext context) {
- Configuration configuration = new Configuration();
+ public NodeInfo transform(Node source, TransformationContext context) {
+ Configuration configuration = SaxonDataBindingHelper.CURR_EXECUTING_CONFIG;
+ if (configuration == null) {
+ configuration = new Configuration();
+ }
NodeInfo docInfo = null;
try {
source = DOMHelper.promote(source);
- docInfo = configuration.buildDocument(new DOMSource(source));
+ docInfo = Builder.build(new DOMSource(source), null, configuration);
} catch (XPathException e) {
throw new TransformationException(e);
}
diff --git a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/NodeInfo2NodeTransformer.java b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/NodeInfo2NodeTransformer.java
index 9b9d8926b9..1e5b816662 100644
--- a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/NodeInfo2NodeTransformer.java
+++ b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/NodeInfo2NodeTransformer.java
@@ -46,7 +46,7 @@ public class NodeInfo2NodeTransformer extends BaseTransformer<NodeInfo, Node> im
Properties props = new Properties();
props.setProperty(OutputKeys.METHOD, "xml");
props.setProperty(OutputKeys.INDENT, "yes");
- QueryResult.serialize(source, destination, props);
+ QueryResult.serialize(source, destination, props, source.getConfiguration());
} catch (Exception e) {
throw new TransformationException(e);
}
diff --git a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/SimpleType2ValueTransformer.java b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/SimpleType2ValueTransformer.java
index 11d2fd0d56..67d89a6e0b 100644
--- a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/SimpleType2ValueTransformer.java
+++ b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/SimpleType2ValueTransformer.java
@@ -23,7 +23,7 @@ import java.math.BigDecimal;
import net.sf.saxon.value.DecimalValue;
import net.sf.saxon.value.DoubleValue;
import net.sf.saxon.value.FloatValue;
-import net.sf.saxon.value.Int64Value;
+import net.sf.saxon.value.IntegerValue;
import net.sf.saxon.value.ObjectValue;
import net.sf.saxon.value.StringValue;
import net.sf.saxon.value.Value;
@@ -63,13 +63,13 @@ public class SimpleType2ValueTransformer extends BaseTransformer<Object, Value>
public Value transform(Object source, TransformationContext context) {
Value result = null;
if (source instanceof Integer) {
- result = new Int64Value((Integer)source);
+ result = new IntegerValue((Integer)source);
} else if (source instanceof Long) {
- result = new Int64Value((Long)source);
+ result = new IntegerValue((Long)source);
} else if (source instanceof Short) {
- result = new Int64Value((Short)source);
+ result = new IntegerValue((Short)source);
} else if (source instanceof Byte) {
- result = new Int64Value((Byte)source);
+ result = new IntegerValue((Byte)source);
} else if (source instanceof Double) {
result = new DoubleValue((Double)source);
} else if (source instanceof Float) {
diff --git a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2ObjectTransformer.java b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2ObjectTransformer.java
index 0af3ce6a04..7589f6789b 100644
--- a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2ObjectTransformer.java
+++ b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2ObjectTransformer.java
@@ -36,7 +36,7 @@ public class Value2ObjectTransformer extends BaseTransformer<Value, Object> impl
public Object transform(Value source, TransformationContext context) {
Object object;
try {
- object = Value.convertToJava(Value.asItem(source));
+ object = Value.convert(Value.asItem(source));
} catch (XPathException e) {
throw new TransformationException(e);
}
diff --git a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2SimpleTypeTransformer.java b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2SimpleTypeTransformer.java
index 0dcea88184..5da4effcfd 100644
--- a/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2SimpleTypeTransformer.java
+++ b/branches/sca-java-1.3/modules/databinding-saxon/src/main/java/org/apache/tuscany/sca/databinding/saxon/Value2SimpleTypeTransformer.java
@@ -36,7 +36,7 @@ public class Value2SimpleTypeTransformer extends BaseTransformer<Value, Object>
public Object transform(Value source, TransformationContext context) {
Object object;
try {
- object = Value.convertToJava(Value.asItem(source));
+ object = Value.convert(Value.asItem(source));
} catch (XPathException e) {
throw new TransformationException(e);
}