protected void parseChildren(XdmNode parent) { XdmSequenceIterator children = parent.axisIterator(Axis.CHILD); while (children.hasNext()) { XdmItem item = children.next(); if (item instanceof XdmNode) { XdmNode child = (XdmNode) item; if (child.getNodeKind() != XdmNodeKind.ELEMENT) continue; bindings.add(Binding.create(child)); } } }
void serialize(OutputContext c) throws XProcException { boolean bRead = false; if (select == null || select.isEmpty()) { // If this input is the default input and its parent is the same, then dont add // an xread if (!step && !c.isDerivedInput(this)) { c.addPreamble("xread " + getPortVariable()); bRead = true; } } else { c.addPreamble("xpath " + XProcUtil.quote(select.xpath) + " >{" + getPortVariable() + "}"); bRead = true; } if (!Util.isEqual(port, "source")) c.addPreamble("<(" + port + ")"); bindings.serialize(c); c.addPreambleLine(""); // if(! bindings.hasInputs() ) if (bRead) c.addBody(" <{" + getPortVariable() + "}"); }