if (node instanceof IDOMNode) {
IStructuredModel model = ((IDOMNode) node).getModel();
String baseLocation = model.getBaseLocation();
if (!baseLocation.equals(IModelManager.UNMANAGED_MODEL)) {
IPath path = new Path(baseLocation);
if (path.segmentCount() > 1) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
if (project.isAccessible()) {
String key = createPreferenceKey(path);
IEclipsePreferences preferences = new ProjectScope(project).getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
type = preferences.get(key, DEFAULT_MIMETYPE);