When an XSL file declares variables that are referenced in included XSL files (i.e. in the enclosing namspace scope), the variable references in the included XSL files are not resolved, and are flagged as errors.
The ideal solution would be for the 'File Associations' feature to allow XSL file dependencies to be resolved as it does for other file types.
At present, the workaround is to declare the variables in all the XSL files (e.g. via an included variable declarations file). However, it should not be necessary to refactor valid XSL files to remove spurious IDE-generated errors.