def set_property_value(self, name, value, dry_run=False):
assert value is None or xml_tools.is_etree_element(value)<EOL>if name in _lockPropertyNames:<EOL><INDENT>raise DAVError(<EOL>HTTP_FORBIDDEN, err_condition=PRECONDITION_CODE_ProtectedProperty<EOL>)<EOL><DEDENT>config = self.environ["<STR_LIT>"]<EOL>mutableLiveProps = config.get("<STR_LIT>", [])<EOL>if (<EOL>name.startswith("<STR_LIT>")<EOL>and name in _standardLivePropNames<EOL>and name in mutableLiveProps<EOL>):<EOL><INDENT>if name in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>try:<EOL><INDENT>return self.set_last_modified(self.path, value.text, dry_run)<EOL><DEDENT>except Exception:<EOL><INDENT>_logger.warning(<EOL>"<STR_LIT>".format(<EOL>self.path<EOL>)<EOL>)<EOL><DEDENT><DEDENT>raise DAVError(HTTP_FORBIDDEN)<EOL><DEDENT>if name.startswith("<STR_LIT>"):<EOL><INDENT>agent = self.environ.get("<STR_LIT>", "<STR_LIT:None>")<EOL>win32_emu = config.get("<STR_LIT>", {}).get("<STR_LIT>", False)<EOL>if win32_emu and "<STR_LIT>" not in agent:<EOL><INDENT>if "<STR_LIT>" in name:<EOL><INDENT>return self.set_last_modified(self.path, value.text, dry_run)<EOL><DEDENT>elif "<STR_LIT>" in name:<EOL><INDENT>return True<EOL><DEDENT>elif "<STR_LIT>" in name:<EOL><INDENT>return True<EOL><DEDENT>elif "<STR_LIT>" in name:<EOL><INDENT>return True<EOL><DEDENT><DEDENT><DEDENT>pm = self.provider.prop_manager<EOL>if pm and not name.startswith("<STR_LIT>"):<EOL><INDENT>refUrl = self.get_ref_url()<EOL>if value is None:<EOL><INDENT>return pm.remove_property(refUrl, name, dry_run, self.environ)<EOL><DEDENT>else:<EOL><INDENT>value = etree.tostring(value)<EOL>return pm.write_property(refUrl, name, value, dry_run, self.environ)<EOL><DEDENT><DEDENT>raise DAVError(HTTP_FORBIDDEN)<EOL>
Set a property value or remove a property.

        value == None means 'remove property'.
        Raise HTTP_FORBIDDEN if property is read-only, or not supported.

        When dry_run is True, this function should raise errors, as in a real
        run, but MUST NOT change any data.

        This default implementation

        - raises HTTP_FORBIDDEN, if trying to modify a locking property
        - raises HTTP_FORBIDDEN, if trying to modify an immutable {DAV:}
          property
        - handles Windows' Win32LastModifiedTime to set the getlastmodified
          property, if enabled
        - stores everything else as dead property, if a property manager is
          present.
        - raises HTTP_FORBIDDEN, else

        Removing a non-existing prop is NOT an error.

        Note: RFC 4918 states that {DAV:}displayname 'SHOULD NOT be protected'

        A resource provider may override this method, to update supported custom
        live properties.