attrName = new QName(attrNameStr, attrNameValue.getNode()); } else { attrName = new QName(apfx == null ? "" : apfx, ans, attrNameStr);
attrName = new QName(attrNameStr, attrNameValue.getNode()); } else { attrName = new QName(apfx == null ? "" : apfx, ans, attrNameStr);
} catch (FileNotFoundException fnfe) { URI uri = href.getBaseURI().resolve(href.getString()); throw new XProcException(href.getNode(), "Cannot read: file does not exist: " + uri.toASCIIString()); } catch (IOException ioe) { throw new XProcException(ioe);
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); if (groupAdjacent != null) { runAdjacent(); } else { runSimple(); } }
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); if (groupAdjacent != null) { runAdjacent(); } else { runSimple(); } }
public void run() throws SaxonApiException { super.run(); RuntimeValue attrNameValue = getOption(_attribute); String attrNameStr = attrNameValue.getString(); String apfx = getOption(_attribute_prefix, (String) null); String ans = getOption(_attribute_namespace, (String) null); if (apfx != null && ans == null) { throw XProcException.dynamicError(34, "You can't specify a prefix without a namespace"); } if (ans != null && attrNameStr.contains(":")) { throw XProcException.dynamicError(34, "You can't specify a namespace if the attribute name contains a colon"); } if (attrNameStr.contains(":")) { attribute = new QName(attrNameStr, attrNameValue.getNode()); } else { // For Saxon 9.4, make sure there's some sort of prefix if there's a namespace; // Saxon will take care of resolving collisions, if necessary if (apfx == null && ans != null) { apfx = "_1"; } attribute = new QName(apfx == null ? "" : apfx, ans, attrNameStr); } label = getOption(_label); replace = getOption(_replace).getBoolean(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); 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 attrNameValue = getOption(_attribute); String attrNameStr = attrNameValue.getString(); String apfx = getOption(_attribute_prefix, (String) null); String ans = getOption(_attribute_namespace, (String) null); if (apfx != null && ans == null) { throw XProcException.dynamicError(34, "You can't specify a prefix without a namespace"); } if (ans != null && attrNameStr.contains(":")) { throw XProcException.dynamicError(34, "You can't specify a namespace if the attribute name contains a colon"); } if (attrNameStr.contains(":")) { attribute = new QName(attrNameStr, attrNameValue.getNode()); } else { // For Saxon 9.4, make sure there's some sort of prefix if there's a namespace; // Saxon will take care of resolving collisions, if necessary if (apfx == null && ans != null) { apfx = "_1"; } attribute = new QName(apfx == null ? "" : apfx, ans, attrNameStr); } label = getOption(_label); replace = getOption(_replace).getBoolean(); matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), getOption(_match)); result.write(matcher.getResult()); }
public void match(XdmNode doc, RuntimeValue match) { XdmNode node = match.getNode(); String expr = match.getString();
public void match(XdmNode doc, RuntimeValue match) { XdmNode node = match.getNode(); String expr = match.getString();
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(); 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()); }
errorCode = new QName(codeNameStr, codeNameValue.getNode()); } else { errorCode = new QName(cpfx == null ? "" : cpfx, cns, codeNameStr);
if (codeNameStr != null) { if (codeNameStr.contains(":")) { errorCode = new QName(codeNameStr, codeNameValue.getNode()); } else { errorCode = new QName(cpfx == null ? "" : cpfx, cns, codeNameStr);
if (codeNameStr != null) { if (codeNameStr.contains(":")) { errorCode = new QName(codeNameStr, codeNameValue.getNode()); } else { errorCode = new QName(cpfx == null ? "" : cpfx, cns, codeNameStr);
errorCode = new QName(codeNameStr, codeNameValue.getNode()); } else { errorCode = new QName(cpfx == null ? "" : cpfx, cns, codeNameStr);
wrapper = new QName(wrapperNameStr, wrapperNameValue.getNode()); } else { wrapper = new QName(wpfx == null ? "" : wpfx, wns, wrapperNameStr);
wrapper = new QName(wrapperNameStr, wrapperNameValue.getNode()); } else { wrapper = new QName(wpfx == null ? "" : wpfx, wns, wrapperNameStr);