public void run(String addnLog) { String type = null; if (XProcConstants.NS_XPROC.equals(step.getType().getNamespaceURI())) { type = step.getType().getLocalName(); } else { type = step.getType().getClarkName(); } logger.debug("Running " + type + " " + step.getName() + addnLog); String msg = step.getExtensionAttribute(cx_message); if (msg != null) { System.err.println("Message: " + msg); } }
public void run(String addnLog) { String type = null; if (XProcConstants.NS_XPROC.equals(step.getType().getNamespaceURI())) { type = step.getType().getLocalName(); } else { type = step.getType().getClarkName(); } logger.debug("Running " + type + " " + step.getName() + addnLog); String msg = step.getExtensionAttribute(cx_message); if (msg != null) { System.err.println("Message: " + msg); } }
public void run() throws SaxonApiException { super.run(); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace("Identity step " + step.getName() + " read " + doc.getDocumentURI()); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace("Identity step " + step.getName() + " read " + doc.getDocumentURI()); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); String version = null; if (getOption(_version) != null) { version = getOption(_version).getString(); } if (version != null && !"4".equals(version)) { throw XProcException.stepError(60); } java.util.UUID id = java.util.UUID.randomUUID(); uuid = id.toString(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); String version = null; if (getOption(_version) != null) { version = getOption(_version).getString(); } if (version != null && !"4".equals(version)) { throw XProcException.stepError(60); } java.util.UUID id = java.util.UUID.randomUUID(); uuid = id.toString(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); XdmNode doc = source.read(); RuntimeValue base = getOption(_base_uri); if (base != null) { setBaseURI = base.getBaseURI().resolve(base.getString()); } logger.trace(MessageFormatter.nodeMessage(doc, "Making URIs absolute against: " + setBaseURI)); matcher = new ProcessMatch(runtime, this); matcher.match(doc, getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); XdmNode doc = source.read(); RuntimeValue base = getOption(_base_uri); if (base != null) { setBaseURI = base.getBaseURI().resolve(base.getString()); } logger.trace(MessageFormatter.nodeMessage(doc, "Making URIs absolute against: " + setBaseURI)); matcher = new ProcessMatch(runtime, this); matcher.match(doc, getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); root = S9apiUtils.getDocumentElement(attributes.read()); attrs = new HashSet<QName> (); XdmSequenceIterator iter = root.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); attrs.add(attr.getNodeName()); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); root = S9apiUtils.getDocumentElement(attributes.read()); attrs = new HashSet<QName> (); XdmSequenceIterator iter = root.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); attrs.add(attr.getNodeName()); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); for (Tuple t : params) { if (!"".equals(encoded)) { encoded += "&"; } encoded += t.name.getLocalName() + "=" + encode(t.value.getString()); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); for (Tuple t : params) { if (!"".equals(encoded)) { encoded += "&"; } encoded += t.name.getLocalName() + "=" + encode(t.value.getString()); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); RuntimeValue nameValue = getOption(_new_name); String nameStr = nameValue.getString(); String npfx = getOption(_new_prefix, (String) null); String nns = getOption(_new_namespace, (String) null); if (npfx != null && nns == null) { throw XProcException.dynamicError(34, "You can't specify a prefix without a namespace"); } if (nns != null && nameStr.contains(":")) { throw XProcException.dynamicError(34, "You can't specify a namespace if the new-name contains a colon"); } if (nameStr.contains(":")) { newName = new QName(nameStr, nameValue.getNode()); } else { newName = new QName(npfx == null ? "" : npfx, nns, nameStr); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); RuntimeValue nameValue = getOption(_new_name); String nameStr = nameValue.getString(); String npfx = getOption(_new_prefix, (String) null); String nns = getOption(_new_namespace, (String) null); if (npfx != null && nns == null) { throw XProcException.dynamicError(34, "You can't specify a prefix without a namespace"); } if (nns != null && nameStr.contains(":")) { throw XProcException.dynamicError(34, "You can't specify a namespace if the new-name contains a colon"); } if (nameStr.contains(":")) { newName = new QName(nameStr, nameValue.getNode()); } else { newName = new QName(npfx == null ? "" : npfx, nns, nameStr); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); RuntimeValue wrapperNameValue = getOption(_wrapper); String wrapperNameStr = wrapperNameValue.getString(); String wpfx = getOption(_wrapper_prefix, (String) null); String wns = getOption(_wrapper_namespace, (String) null); if (wpfx != null && wns == null) { throw XProcException.dynamicError(34, step.getNode(), "You can't specify a prefix without a namespace"); } if (wns != null && wrapperNameStr.contains(":")) { throw XProcException.dynamicError(34, step.getNode(), "You can't specify a namespace if the wrapper name contains a colon"); } if (wrapperNameStr.contains(":")) { wrapper = new QName(wrapperNameStr, wrapperNameValue.getNode()); } else { wrapper = new QName(wpfx == null ? "" : wpfx, wns, wrapperNameStr); } groupAdjacent = getOption(_group_adjacent); inGroup.push(false); XdmNode doc = source.read(); wrapperCode = new FingerprintedQName(wrapper.getPrefix(),wrapper.getNamespaceURI(),wrapper.getLocalName()); matcher = new ProcessMatch(runtime, this); matcher.match(doc,getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }
public void run() throws SaxonApiException { super.run(); String value = getOption(_value).getString(); QName algorithm = getOption(_algorithm).getQName(); String version = null; if (getOption(_version) != null) { version = getOption(_version).getString(); } if (_crc.equals(algorithm)) { hash = crc(value, version); } else if (_md.equals(algorithm)) { hash = md(value, version); } else if (_sha.equals(algorithm)) { hash = sha(value, version); } else if (_hmac.equals(algorithm)) { hash = hmac(value, params.get(_accessKey)); } else { throw XProcException.dynamicError(36); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); if (source.moreDocuments()) { throw XProcException.dynamicError(6, "Reading source on " + getStep().getName()); } result.write(matcher.getResult()); }