This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The definition of a key can include function calls in its use= attribute, or in predicates within its match= attribute. It can also contain references to global variables and to named templates rules; potentially it can use apply-templates. We therefore need to consider what happens when the functions/templates/variables that it references are overridden in a using package. The scope of keys is local to a package, and a call to the key() function can only appear within the package containing the declaration of the key. Therefore, I think we get the right effect if outward component references from a key definition are always "fixed" to components in the package containing the key declaration, and are never subsequently re-bound. This has the additional merit that the compiler knows the full definition of the key when compiling the package, and can use this knowledge. We need to explain this, with examples, in section 3.6.4.
Contrary to what is suggested in the bug report, we don't think outward references from the key should be treated as final if the target components are in fact overridden. Keys should be treated as private components that can contain outward references but cannot be overridden or exposed in using packages.
The change described in comment 1 was accepted and has been applied.