@Override
    public void setProperty(String propertyId, Object value)
            throws SAXNotRecognizedException, SAXNotSupportedException {
        // see if the property is recognized
        getProperty(propertyId);

        // Properties with a defined value, we just change it if we can.

        if ((PROPERTY + "declaration-handler").equals(propertyId)) {
            if (value == null) {
                declHandler = base;
            } else if (!(value instanceof DeclHandler)) {
                throw new SAXNotSupportedException(propertyId);
            } else {
                declHandler = (DeclHandler) value;
            }
            return;
        }

        if ((PROPERTY + "lexical-handler").equals(propertyId)) {
            if (value == null) {
                lexicalHandler = base;
            } else if (!(value instanceof LexicalHandler)) {
                throw new SAXNotSupportedException(propertyId);
            } else {
                lexicalHandler = (LexicalHandler) value;
            }
            return;
        }

        throw new SAXNotSupportedException(propertyId);
    }
<b>SAX2</b>: Assigns the specified property. Like SAX1 handlers, these
may be changed at any time.
src/nu/validator/gnu/xml/aelfred2/SAXDriver.java