private Map processAttributesByPrefs(Map attributes, Preferences options) {
        Map result = new HashMap();
        // attribute names to skip
        Set namesOfAttributeToIgnore  = options.getSet(Constants.IGNORE_ATTS);
        // attribute names whose value is relevant
        Set namesOfAttributeWithValue = options.getSet(Constants.ATTS_VALUES);
        // complement is true if attributeValue property indicate only the names of attr. whose values should be discarded
        boolean complement = namesOfAttributeWithValue.contains(Preferences.NEG);
        Iterator it = attributes.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry)it.next();
            String key = (String)entry.getKey();
            String name = key.toLowerCase().trim();
            String value = (String)entry.getValue();
            if (namesOfAttributeToIgnore.contains(name)) continue;
            if (namesOfAttributeWithValue.contains(name))
                result.put(name, (complement ? null : value ));
            else result.put(name, (complement ? value : null ));
        }
        return result;
    }