Hi
I've just had a look at the 1881 enumerators transcript image and living at the SAME address as Elizabeth James and Emmeline (but seemingly in a different household) is a Sarah NECK, widow, aged 69 born Fishponds, Gloucester. As Elizabeth's name at the time of her marriage was Elizabeth Neck this means that it is almost certainly your Elizabeth. Presumable Sarah Neck is a relative of Elizabeth's. Sarah Neck is also listed as Head, there is also a lodger John Evans at the address.
Living next door is a John James and his wife, he is not connected to your John James, but it just goes to show exactly how common the name is!
So it would seem almost certain that your John James was at sea at the time of the 1881 census.
If you know the name of the vessel he was likely to be on in 1881 I would assume that there is some way of finding out if records for that ship exist. I'm afraid I don't know how you would go about finding them though - I did find this website by googling:
http://www.angelfire.com/de/BobSanders/Swansea81.htmlThat link takes you to the first page (there are two pages) of ships in port at Swansea in 1881. There may be something on the main site that will help point you in the right direction with regards to finding out about ships at sea.
Good Luck as if you can just find out what part of Dorset John James was from, you may be able to find him in earlier census records, possibly with his parents/siblings