public void apply() throws XPathExpressionException {
        if(!input.isEnabled()) {
            return;
        }
        
        int value = Integer.parseInt(input.getText());

        // sanity checks
        if(value < min) {
            throw new IllegalArgumentException("Value is " + value + ". Has to be > " + min);
        }

        if(value > max) {
            throw new IllegalArgumentException("Value is " + value + ". Has to be < " + max);
        }

        Element e = editor.getXMLElementByString(this.xmlPath);
        MessageUtil.debug("Setting element " + e.getNodeName() + " attribute "+attributeName+ " to "+value);
        e.setAttribute(attributeName, Integer.toString(value));
    }