void parse(XdmNode node) { port = XProcUtil.getAttrString(node, "port"); sequence = XProcUtil.getAttrBool(node, "sequence", false); primary = XProcUtil.getAttrBoolean(node, "primary"); kind = XProcUtil.getAttrString(node, "kind"); select = new XPathExpression(XProcUtil.getAttrString(node, "select"), false); // parse children parseChildren(node); }
@Override void parse(XdmNode node) { String hr = XProcUtil.getAttrString(node, "href"); URI base = node.getBaseURI(); if (base != null) href = base.resolve(hr).toString(); else href = hr; }
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() + "}"); }