Treating compositions in the form of solgel or aerogel