def vrt_body_source(
    fname, band, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h
):
    """
    Generate a source section in vrt body.

    Args:
        fname: Relative path to the source image
        band: index of the band to use as source
        src_x, src_y, src_w, src_h: source window (cropped from source image)
        dst_x, dst_y, dst_w, dst_h: destination window
                                    (where crop will be pasted)
    """

    body = "\t\t<SimpleSource>\n"
    body += (
        "\t\t\t<SourceFileName relativeToVRT='1'>%s</SourceFileName>\n" % fname
    )
    body += "\t\t\t<SourceBand>%i</SourceBand>\n" % band
    body += "\t\t\t<SrcRect xOff='%i' yOff='%i'" % (src_x, src_y)
    body += "xSize='%i' ySize='%i'/>\n" % (src_w, src_h)
    body += "\t\t\t<DstRect xOff='%i' yOff='%i'" % (dst_x, dst_y)
    body += "xSize='%i' ySize='%i'/>\n" % (dst_w, dst_h)
    body += "\t\t</SimpleSource>\n"

    return body