/** * Write an XdmValue to a given destination. The sequence represented by the XdmValue is "normalized" * as defined in the serialization specification (this is equivalent to constructing a document node * in XSLT or XQuery with this sequence as the content expression), and the resulting document is * then copied to the destination. If the destination is a serializer this has the effect of serializing * the sequence as described in the W3C specifications. * @param runtime The runtime * @param values the value to be written * @param destination the destination to which the value is to be written * @param baseURI the base URI * @throws SaxonApiException if something goes wrong */ public static void writeXdmValue(XProcRuntime runtime, Vector<XdmValue> values, Destination destination, URI baseURI) throws SaxonApiException { writeXdmValue(runtime.getProcessor(), values, destination, baseURI); }
/** * Write an XdmValue to a given destination. The sequence represented by the XdmValue is "normalized" * as defined in the serialization specification (this is equivalent to constructing a document node * in XSLT or XQuery with this sequence as the content expression), and the resulting document is * then copied to the destination. If the destination is a serializer this has the effect of serializing * the sequence as described in the W3C specifications. * @param runtime The runtime * @param values the value to be written * @param destination the destination to which the value is to be written * @param baseURI the base URI * @throws SaxonApiException if something goes wrong */ public static void writeXdmValue(XProcRuntime runtime, Vector<XdmValue> values, Destination destination, URI baseURI) throws SaxonApiException { writeXdmValue(runtime.getProcessor(), values, destination, baseURI); }
public XdmNode read() throws SaxonApiException { read = true; if (doc != null) { return doc; } if (nodes != null) { // Find the document element so we can get the base URI XdmNode node = null; for (int pos = 0; pos < nodes.size() && node == null; pos++) { if (((XdmNode) nodes.get(pos)).getNodeKind() == XdmNodeKind.ELEMENT) { node = (XdmNode) nodes.get(pos); } } XdmDestination dest = new XdmDestination(); try { S9apiUtils.writeXdmValue(cfgProcessor, nodes, dest, node.getBaseURI()); doc = dest.getXdmNode(); if (excludeUris.size() != 0) { doc = S9apiUtils.removeNamespaces(cfgProcessor, doc, excludeUris, true); } } catch (SaxonApiException sae) { throw new XProcException(sae); } } else { doc = readXML(href, base); } return doc; }
public XdmNode read() throws SaxonApiException { read = true; if (doc != null) { return doc; } if (nodes != null) { // Find the document element so we can get the base URI XdmNode node = null; for (int pos = 0; pos < nodes.size() && node == null; pos++) { if (((XdmNode) nodes.get(pos)).getNodeKind() == XdmNodeKind.ELEMENT) { node = (XdmNode) nodes.get(pos); } } XdmDestination dest = new XdmDestination(); try { S9apiUtils.writeXdmValue(cfgProcessor, nodes, dest, node.getBaseURI()); doc = dest.getXdmNode(); if (excludeUris.size() != 0) { doc = S9apiUtils.removeNamespaces(cfgProcessor, doc, excludeUris, true); } } catch (SaxonApiException sae) { throw new XProcException(sae); } } else { doc = readXML(href, base); } return doc; }
S9apiUtils.writeXdmValue(runtime, nodes, dest, baseURI); XdmNode doc = dest.getXdmNode();
S9apiUtils.writeXdmValue(runtime, nodes, dest, baseURI); XdmNode doc = dest.getXdmNode();
S9apiUtils.writeXdmValue(runtime, nodes, dest, node.getBaseURI()); add(input, port, dest.getXdmNode()); S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI()); XdmNode newNode = dest.getXdmNode(); add(input, port, newNode);
S9apiUtils.writeXdmValue(runtime, nodes, dest, node.getBaseURI()); add(input, port, dest.getXdmNode()); S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI()); XdmNode newNode = dest.getXdmNode(); add(input, port, newNode);
} else { XdmDestination dest = new XdmDestination(); S9apiUtils.writeXdmValue(runtime,item,dest,null); value += dest.getXdmNode().getStringValue();
S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI());
} else { XdmDestination dest = new XdmDestination(); S9apiUtils.writeXdmValue(runtime,item,dest,null); value += dest.getXdmNode().getStringValue();
S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI());
baseURI = new URI("http://example.com/"); // FIXME: do I need this? S9apiUtils.writeXdmValue(runtime.getProcessor(), nodes, dest, baseURI); XdmNode doc = dest.getXdmNode(); stringValue += doc.getStringValue();
S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI());
baseURI = new URI("http://example.com/"); // FIXME: do I need this? S9apiUtils.writeXdmValue(runtime.getProcessor(), nodes, dest, baseURI); XdmNode doc = dest.getXdmNode(); stringValue += doc.getStringValue();
S9apiUtils.writeXdmValue(runtime, node, dest, node.getBaseURI());
S9apiUtils.writeXdmValue(runtime, nodes, dest, root.getBaseURI()); doc = dest.getXdmNode();
S9apiUtils.writeXdmValue(runtime, nodes, dest, root.getBaseURI()); doc = dest.getXdmNode();