The influence of absorption of wave energy in regions of local plasma resonances in inhomogeneous (in the transverse direction) plasmas on the axial structure of discharges sustained by surface waves is studied analytically. The two regimes of charged-particle loss, namely diffusion- and recombinationcontrolled regimes, are considered. First, to extract the basic features of the phenomena, the discharge is modelled by a slab configuration and the case of slow surface-wave propagation is investigated. It is shown that it is resonant absorption that determines the properties of the discharge in the region towards its end. In the case of a cylindrical waveguide, which is the real configuration in experiments, the influence of the mechanism of resonant absorption is studied in both regions of fast and slow surface-wave propagation. With respect to the discharge behaviour, these cases correspond respectively to the regions at the beginning of the discharge close to the surface-wave launcher and at the discharge end.