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); }
protected void augmentOptions() { Step decl = declaration; if (decl == null) { throw new UnsupportedOperationException("Unexpected step type: " + getType()); } Hashtable<QName,Option> declOptions = new Hashtable<QName,Option> (); for (Option option : decl.options()) { declOptions.put(option.getName(), option); } // Add any options that have default values... for (QName oname : declOptions.keySet()) { Option doption = declOptions.get(oname); Option option = getOption(oname); if (option == null) { if (doption.getSelect() != null || doption.getBinding().size() != 0) { addOption(doption); } } else { option.setType(doption.getType(), doption.getNode()); // copy the type over } } }
protected void augmentOptions() { Step decl = declaration; if (decl == null) { throw new UnsupportedOperationException("Unexpected step type: " + getType()); } Hashtable<QName,Option> declOptions = new Hashtable<QName,Option> (); for (Option option : decl.options()) { declOptions.put(option.getName(), option); } // Add any options that have default values... for (QName oname : declOptions.keySet()) { Option doption = declOptions.get(oname); Option option = getOption(oname); if (option == null) { if (doption.getSelect() != null || doption.getBinding().size() != 0) { addOption(doption); } } else { option.setType(doption.getType(), doption.getNode()); // copy the type over } } }
} else { if (option.getRequired() && option.getSelect() == null) { throw XProcException.staticError(18, option.getNode(), "No value provided for required option \"" + option.getName() + "\"");
} else { if (option.getRequired() && option.getSelect() == null) { throw XProcException.staticError(18, option.getNode(), "No value provided for required option \"" + option.getName() + "\"");
if (XProcConstants.p_with_option.equals(option.getNode().getNodeName())) { if (!checkOptionBinding(option, true)) { valid = false;
if (XProcConstants.p_with_option.equals(option.getNode().getNodeName())) { if (!checkOptionBinding(option, true)) { valid = false;