Just on the chance someone does not know this, Yamaha has just about all parts books online.
Go to:
http://www.yamaha-motor.com/home_parts.aspx
Then click on the Star Cycles link, I know an XS400 was not a Star when it was built but that is where the bikes are listed.
Unfortunately you will see "Discontinued" next to most parts but just having the original part number can help when doing a search online for someone selling old parts. I think Boats.net also has the parts books there too.
Besides looking up part numbers having the parts break-down to look at can answer many questions during assembly of that bike you took apart five years ago and are just getting around to putting it back together!