Theory of spatial solitons