/** * Append an arbitrary item (node, atomic value, or function) to the output. * By default, if the item is an element * node, it is copied with all namespaces. * * @param item the item to be appended * @throws net.sf.saxon.trans.XPathException if the operation fails */ public void append(Item item) throws XPathException { append(item, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); }
/** * Append an arbitrary item (node, atomic value, or function) to the output. * By default, if the item is an element * node, it is copied with all namespaces. * * @param item the item to be appended * @throws net.sf.saxon.trans.XPathException if the operation fails */ public void append(Item item) throws XPathException { append(item, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); }
/** * Process the instruction, without returning any tail calls * * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { context.getReceiver().append(this, 0, NodeInfo.ALL_NAMESPACES); }
/** * Process the instruction, without returning any tail calls * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { if (node != null) { context.getReceiver().append(node, 0, NodeInfo.ALL_NAMESPACES); } }
/** * Process the instruction, without returning any tail calls * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { if (node != null) { context.getReceiver().append(node, 0, NodeInfo.ALL_NAMESPACES); } }
/** * Process the instruction, without returning any tail calls * * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { context.getReceiver().append(this, 0, NodeInfo.ALL_NAMESPACES); }
public void append(Item item, int locationId, int copyNamespaces) throws XPathException { if (item instanceof NodeInfo) { int kind = ((NodeInfo)item).getNodeKind(); if (kind == Type.ATTRIBUTE || kind == Type.NAMESPACE) { ((NodeInfo)item).copy(this, NodeInfo.NO_NAMESPACES, false, 0); return; } } ((SequenceReceiver)nextReceiver).append(item, locationId, copyNamespaces); } }
public TailCall processLeavingTail(XPathContext context) throws XPathException { // TODO: we're always constructing the document in memory. Sometimes we could push it out directly. Item item = evaluateItem(context); if (item != null) { SequenceReceiver out = context.getReceiver(); out.append(item, locationId, NodeInfo.ALL_NAMESPACES); } return null; }
public TailCall processLeavingTail(XPathContext context) throws XPathException { // TODO: we're always constructing the document in memory. Sometimes we could push it out directly. Item item = evaluateItem(context); if (item != null) { SequenceReceiver out = context.getReceiver(); out.append(item, locationId, NodeInfo.ALL_NAMESPACES); } return null; }
/** * Process the expression by writing the value to the current Receiver * * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { SequenceReceiver out = context.getReceiver(); out.append(asItem(), 0, NodeInfo.ALL_NAMESPACES); }
public void append(Item item, int locationId, int copyNamespaces) throws XPathException { if (item instanceof NodeInfo) { int kind = ((NodeInfo)item).getNodeKind(); if (kind == Type.ATTRIBUTE || kind == Type.NAMESPACE) { ((NodeInfo)item).copy(this, NodeInfo.NO_NAMESPACES, false, 0); return; } } ((SequenceReceiver)nextReceiver).append(item, locationId, copyNamespaces); } }
/** * Process the expression by writing the value to the current Receiver * * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { SequenceReceiver out = context.getReceiver(); out.append(asItem(), 0, NodeInfo.ALL_NAMESPACES); }
/** * Helper method for subclasses to invoke if required: flatten an array */ protected void flatten(ArrayItem array, Location locationId, int copyNamespaces) throws XPathException { for (Sequence<?> member : array.members()) { member.iterate().forEachOrFail(it -> append(it, locationId, copyNamespaces)); } }
public static void copySequence(SequenceIterator in, SequenceReceiver out) throws XPathException { out.open(); while (true) { Item item = in.next(); if (item == null) { break; } out.append(item, 0, NodeInfo.ALL_NAMESPACES); } out.close(); } }
public static void copySequence(SequenceIterator in, SequenceReceiver out) throws XPathException { out.open(); while (true) { Item item = in.next(); if (item == null) { break; } out.append(item, 0, NodeInfo.ALL_NAMESPACES); } out.close(); } }
/** * Helper method for subclasses to invoke if required: flatten an array */ protected void flatten(ArrayItem array, Location locationId, int copyNamespaces) throws XPathException { for (Sequence<?> member : array.members()) { member.iterate().forEachOrFail(it -> append(it, locationId, copyNamespaces)); } }
/** * Process the value as an instruction, without returning any tail calls * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { SequenceIterator iter = iterate(); SequenceReceiver out = context.getReceiver(); while (true) { Item it = iter.next(); if (it==null) break; out.append(it, 0, NodeInfo.ALL_NAMESPACES); } }
/** * Process the value as an instruction, without returning any tail calls * @param context The dynamic context, giving access to the current node, * the current variables, etc. */ public void process(XPathContext context) throws XPathException { SequenceIterator iter = iterate(); SequenceReceiver out = context.getReceiver(); while (true) { Item it = iter.next(); if (it==null) break; out.append(it, 0, NodeInfo.ALL_NAMESPACES); } }