That would be nice except that it takes 35 kWh of electricity ($3.50) to generate a kg of hydrogen. Or you can use NG and get the hydrogen for about a buck / kg. But then you would ask yourself why not just burn the NG in an engine and eliminate the conversion losses? Carrying around natural gas gives you 25 MJ / liter but hydrogen is only 10 MJ / liter. Gasoline is 35 MJ / liter.
Conceivably we could use nukes to generate the electricity for hydrolysis, and the Obama admin is dedicated to building more nukes. Whoops, never mind, that dedication only lasted while ratification of the latest global warming treaty was on the table - LOL.
Food for thought