def add_sld_xml_to_layer(self, formatted_sld_object):
        """
        NOT USING, tiles were not getting refreshed properly
        Keeping code around in case needed in the future
        """
        if not formatted_sld_object:
            return False

        print 'type(formatted_sld_object)', type(formatted_sld_object)
        # (1) Verify the XML
        if not self.is_xml_verified(formatted_sld_object.formatted_sld_xml):
            self.add_err_msg('The style information contains invalid XML')
            return False

        # (2) Retrieve the layer
        layer_obj = self.gs_catalog_obj.get_layer(self.layer_name)
        if layer_obj is None:
            self.add_err_msg('The layer "%s" does not exist' % self.layer_name)
            return False

        self.show_layer_style_list(layer_obj)
        #self.clear_alternate_style_list(layer_obj)

        # (3) Create a style name
        #stylename = self.layer_name + self.get_random_suffix()
        #while self.is_style_name_in_catalog(stylename):
        #    stylename = self.layer_name + self.get_random_suffix()
        style_name = formatted_sld_object.sld_name
        # (4) Add the xml style to the catalog, with the new name
        try:
            # sync names
            self.gs_catalog_obj.create_style(style_name, formatted_sld_object.formatted_sld_xml)
        except:
            self.add_err_msg('Failed to add style to the catalog: %s' % style_name)
            return False

        # (5) Pull the style object back from the catalog
        new_style_obj = self.gs_catalog_obj.get_style(style_name)
        if new_style_obj is None:
            self.add_err_msg('Failed to find recently added style in the catalog: %s' % style_name)
            return False

        # (6) Set the new style as the default for the layer
        layer_obj.default_style = new_style_obj

        # Save it!
        try:
            self.gs_catalog_obj.save(layer_obj)
        except:
            self.add_err_msg('Failed to save new default style with layer' % (style_name))
            return False


        self.create_layer_metadata(self.layer_name)
        print ('layer %s saved with style %s' % (self.layer_name, style_name))
        return True