I'd just use a diode, fairly large capacitor, and the LM317T. Bolt the LM317T to the chassis for heatsinking and you're good to go.
FWIW, most of my electronic projects for interfacing with locomotive electronics uses a single diode for the reasons Stan stated, I need a common AC and DC ground.