There is a James Melrose, 22, born Edinburgh, recorded in the 1911 Census (Overseas Military) shown as a Private serving with the 2nd Battalion, The Black Watch (Royal Highlanders), at Sialkot in the Punjab. (1911 Census for England and Wales Ref RG14, Piece 34987, Reference:
RG14PN34987 RD641 SD12 ED4 SN9999)
There is also a casualty listed on the Commonwealth War Graves Commission website, a James Melrose who was serving (Service no. 599) as a Corporal with the 2nd Bn., Black Watch (Royal Highlanders) and fell in action on 9 May 1915. His body was never found and he is one of the many like him whose names are recorded on the Le Touret Memorial, just outside the village of Le Touret in France. Unfortunately, his age is unknown and the CWGC have no details of his parents, so this James may or may not be yours. However, the Scottish National War Memorial (
http://www.snwm.org) database shows him to have been born in Edinburgh so there might have been a note of his death in the Edinburgh Evening News at the time.
There was another James Melrose who served with the Black Watch and fell in the First World War (14 July 1916) but he was with the 1st Battalion, and, according to the Scottish National War Memorial website, he was from Ashkirk in Roxburghshire, so he's not yours. However, if the one listed above as being in the Punjab in 1911 served in the first World War he could well have been with another regiment by that time ... so check against the CWGC (
http://www.cwgc.org) and the Scottish National War Memorial websites (
http://www.snwm.org/website/frames.html)
However, there was also listed in the 1911 Census for England and Wales a James Macpherson Melrose, aged 23 and born Edinburgh, apparently working as a clerk, who was enumerated as a boarder in West Kensington in Fulham (9 Gunterstone Road, West Kensington) RG14, Piece 304, Reference RG14PN304 RG78PN10 RD3 SD4 ED1 SN290
You will have to do some further background work to narrow your search ... One of these or none of these could be your James!