I have lenses from a Canon EOS rebel Xs film camera: 28-80mm f/4-5.6 II (diameter 58mm) and a Sigma 100-300mm f/4.5-6.7. I am thinking to buy a Canon Digital 40D and use these lenses. Will those lenses be compatible with a digital camera?
Yes, those lenses will be compatible. The EOS Rebel uses the same EF mount lenses as the EOS digital SLRs. They might not perform as well as more recent designs (focus will be slower, and the lenses will be more prone to flare than ones coated for use on digital cameras), but they will work just fine.
Yes, they are theoretically compatible (third-party lenses sometimes have problems), as you were told already. The camera will focus and meter properly with these lenses. As @Stan also mentioned, they wont perform up to par with modern lenses.
The key difference is that the Canon EOS 40D has an APS-C sensor which is smaller than 35mm film by a linear factor of 1.6X. This means that the field-of-view you see on the 40D will NOT be the same as on the film camera. For your lenses that means:
- The 28-80mm will give you the same field of view as a 45-128mm lens would on the film camera.
- The 100-300mm will give you the same field of view as a 160-480mm.
So while they are compatible, you will lose wide-angle coverage. That would require a lens starting at 17mm or so. One a full-frame DSLR like the EOS 6D, 5D (any Mark) or 1D X (or previous 1Ds series), the field-of-view would be the same because those cameras do not have a crop-factor.
The Canon lens will work, no questions asked. The Sigma may or may not work, if it does not it is due to electronic incompatibility... Sigma has not licensed the Canon EF communications protocol that makes the lens and camera body talk to each other, but has reverse-engineered it instead. This means that while a Sigma lens works on camera A it may not necessarily work on camera B because camera B uses bits of the protocol that were inactive in camera A and that Sigma did not know existed. There has been a number of issues with old Sigma lenses on "newer" (post-Canon 1D mark nothing, IIRC) Canon bodies. Sigma did offer free software upgrades ("re-chipping") of such lenses back in the day but I don't know if they still do.
Slightly off topic from the original question: While the Canon EF Lenses will work as the posters above have stated, any TTL flash will NOT. The connectors look the same, but E-TTL has a different pin-out, and I believe different voltages. I have read that a TTL flash from the Film days can damage an E-TTL camera. In my case I did not damage the body, but the flash I had orginally bought to use on an EOS Elan, would not fire on the Rebel XSi