Walton, John Lawson, Sir, active 1872-1908, Attorney-General