In general, validation of an element involves validation of the subtree rooted at that element, but can be performed without reference to its context. Thus, the spec manages almost completely to avoid any appeal to the notion of 'document' in defining validation.
Similar arguments apply to keys and keyrefs.
The Schema WG has discussed the issue you have raised and has decided there does need to be better clarification in the specification. The editors have agreed to address this in the XML Schema Proposed Recommendation.