private void checkBoolean(XdmNode node, String name, String value) { if (value != null && !"true".equals(value) && !"false".equals(value)) { runtime.error(null, node, name + " on serialization must be 'true' or 'false'", XProcConstants.staticError(40)); } }
private void checkBoolean(XdmNode node, String name, String value) { if (value != null && !"true".equals(value) && !"false".equals(value)) { runtime.error(null, node, name + " on serialization must be 'true' or 'false'", XProcConstants.staticError(40)); } }
public static XProcException staticError(int errno, Exception except) { return new XProcException(XProcConstants.staticError(errno), except); }
public static XProcException staticError(int errno) { return new XProcException(XProcConstants.staticError(errno)); }
public static XProcException staticError(int errno, XdmNode node, String message) { return new XProcException(XProcConstants.staticError(errno), node, message); }
public static XProcException staticError(int errno) { return new XProcException(XProcConstants.staticError(errno)); }
public static XProcException staticError(int errno, XdmNode node, Throwable cause, String message) { return new XProcException(XProcConstants.staticError(errno), node, cause, message); }
public static XProcException staticError(int errno, Exception except) { return new XProcException(XProcConstants.staticError(errno), except); }
public static XProcException staticError(int errno, String message) { return new XProcException(XProcConstants.staticError(errno), message); }
public static XProcException staticError(int errno, XdmNode node, String message) { return new XProcException(XProcConstants.staticError(errno), node, message); }
@Override public boolean valid() { boolean valid = true; if (testExpr == null || "".equals(testExpr)) { runtime.error(null, node, "Test expression on p:when must be specified.", XProcConstants.staticError(38)); valid = false; } if (!super.valid()) { valid = false; } return valid; } }
@Override public boolean valid() { boolean valid = true; if (testExpr == null || "".equals(testExpr)) { runtime.error(null, node, "Test expression on p:when must be specified.", XProcConstants.staticError(38)); valid = false; } if (!super.valid()) { valid = false; } return valid; } }
public boolean valid(Environment env) { boolean valid = true; if (bindings.size() > 1) { error("Option can have at most one binding.", XProcConstants.dynamicError(8)); valid = false; } if (required && (select != null)) { error("You can't specify a default value on a required option", XProcConstants.staticError(17)); } return valid; }
public boolean valid(Environment env) { boolean valid = true; if (bindings.size() > 1) { error("Variables can have at most one binding.", XProcConstants.dynamicError(8)); valid = false; } if (select == null) { error("You must specify select on variable.", XProcConstants.staticError(16)); } return valid; }
public boolean valid(Environment env) { boolean valid = true; if (bindings.size() > 1) { error("Variables can have at most one binding.", XProcConstants.dynamicError(8)); valid = false; } if (select == null) { error("You must specify select on variable.", XProcConstants.staticError(16)); } return valid; }
public boolean valid(Environment env) { boolean valid = true; if (bindings.size() > 1) { error("Option can have at most one binding.", XProcConstants.dynamicError(8)); valid = false; } if (required && (select != null)) { error("You can't specify a default value on a required option", XProcConstants.staticError(17)); } return valid; }
public void addOption(Option option) { // FIXME: Is it worth making a hash for this? QName optName = option.getName(); for (Option exoption : options) { if (optName.equals(exoption.getName())) { error(option.getNode(),"Duplication option name: " + optName,XProcConstants.staticError(4)); } } options.add(option); }
public void addOption(Option option) { // FIXME: Is it worth making a hash for this? QName optName = option.getName(); for (Option exoption : options) { if (optName.equals(exoption.getName())) { error(option.getNode(),"Duplication option name: " + optName,XProcConstants.staticError(4)); } } options.add(option); }
private void checkExtensionAttributes(XdmNode node, SourceArtifact src) { for (XdmNode attr : new AxisNodes(node, Axis.ATTRIBUTE)) { QName aname = attr.getNodeName(); if ("".equals(aname.getNamespaceURI())) { // nop } else if (XProcConstants.NS_XPROC.equals(aname.getNamespaceURI())) { runtime.error(null, node, "Attribute \"" + aname + "\" not allowed on " + node.getNodeName(), XProcConstants.staticError(8)); } else { src.addExtensionAttribute(attr); } } }
private void checkExtensionAttributes(XdmNode node, SourceArtifact src) { for (XdmNode attr : new AxisNodes(node, Axis.ATTRIBUTE)) { QName aname = attr.getNodeName(); if ("".equals(aname.getNamespaceURI())) { // nop } else if (XProcConstants.NS_XPROC.equals(aname.getNamespaceURI())) { runtime.error(null, node, "Attribute \"" + aname + "\" not allowed on " + node.getNodeName(), XProcConstants.staticError(8)); } else { src.addExtensionAttribute(attr); } } }