diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/config/NoNamespaceSchemaProvider.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/config/NoNamespaceSchemaProvider.java index 556b68eb7c98..db4054aca590 100644 --- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/config/NoNamespaceSchemaProvider.java +++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/config/NoNamespaceSchemaProvider.java @@ -50,6 +50,10 @@ public class NoNamespaceSchemaProvider extends XmlSchemaProvider { @Override public boolean isAvailable(@NotNull XmlFile file) { - return file.getFileType() == XmlFileType.INSTANCE; + if (file.getFileType() != XmlFileType.INSTANCE) { + return false; + } + NoNamespaceConfig config = NoNamespaceConfig.getInstance(file.getProject()); + return config != null && config.getMappedFile(file) != null; } } \ No newline at end of file