The skin, one of the most crucial organs of the human body, serves as a barrier between the body and the external environment. Early detection of skin diseases is imperative to reduce mortality rates, as some untreated conditions may progress to skin cancer. Segmentation and classification of lesions represent pivotal and interrelated endeavors within the realm of skin disease diagnosis. For this purpose, this paper presents a comprehensive diagnostic framework for segmentation and classification of skin lesions, which integrates a Legendre multiwavelet transform-based fusion XNet (LW-XNet) with an improved soft attention dense connection convolutional network (ISA-DenseNet). LW-XNet combines the strengths of XNet in fusing different frequency components of images, along with the strong feature representation capability of LW bases with various regularities for overall contextual information and detailed information of dermoscopy images. Furthermore, its encoder devises a LWT channel concatenate (LCC) block to subdivide the image into eight wavelet coefficient feature images and perform concatenated processing on them, enabling it to better differentiate and comprehend the intricate features within dermoscopy images. Finally, ISA-DenseNet is utilized for multi-class classification of the segmented images. Experimental results demonstrate the superiority of the proposed framework over existing segmentation and classification methods.