"The Scottish Students' Song Book" (1897) attributes "The Dying Lancer" to the novelist G. J. Whyte Melville and the musician Charles Coote.
In spite of long searches, I've been unable to find any earlier connection of the song to Melville or Coote. In the 1887 "University of Toronto Song Book," it's unattributed.
S. B. Luce's "Naval Songs" (1883) (with the jacket but not the lancer) credits one "W.P.B."
There are textual differences among all three versions, none of which closely resemble the much earlier anonymous broadside that seems to have been part of the inspiration.
Whyte Melville died in 1878, Coote around 1880.
Does anybody have any further information or documentation on the relationship of Melville and Coote to the song? (The British Library appears to have no sheet music publication.)