public String getValue(String name) {
        Iterator<Attributes> iter = scopes.descendingIterator();
        String value;
        
        // Check the scoped attributes
        while (iter.hasNext()) {
            // Check for the key in the next scope
            value = (iter.next()).getValue(name);
            
            // If found, return it
            if (value != null) {
                return value;
            }
        }
        
        // Return the unscoped value or null if the key could not be found
        return attributes.getValue(name);
    }