"SLR" = Single-Lens Reflex
The "D" appended to the front indicates a digital sensor instead of film.
Both types use a moving mirror system that enables you to look right through the lens, unlike a point-and-shoot camera.
So yes, the Nikon D40 and Canon XTi are both digital. All DSLRs are SLR cameras, but not all SLR cameras are digital. Does that help?