diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java index 93f730e95917..65b3f32c1fb5 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java @@ -342,7 +342,7 @@ public class XsltSupport { public static final ParameterizedCachedValueProvider INSTANCE = new XsltSupportProvider(); public CachedValueProvider.Result compute(PsiFile psiFile) { - if (psiFile instanceof PsiFileEx) { + if (psiFile instanceof PsiFileEx && psiFile instanceof XmlFile) { if (((PsiFileEx)psiFile).isContentsLoaded()) { final XmlDocument doc = ((XmlFile)psiFile).getDocument(); if (doc != null) {