*** empty log message ***
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
new file mode 100644
index 0000000..6a87787
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Doug Satchwell (Chase Technology Ltd) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsl.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.xsl.core.internal.model.SourceFile;
+import org.eclipse.wst.xsl.core.internal.model.SourceFileBuilder;
+
+public class XSLCore
+{
+	private static XSLCore instance; 
+	private SourceFileBuilder builder = new SourceFileBuilder();
+	private Map<IFile, SourceFile> sourceFiles = new HashMap<IFile, SourceFile>();
+	
+	private XSLCore()
+	{}
+	
+	/**
+	 * Get the cached sourceFile, or build it if it has not yet been built.
+	 * 
+	 * @param file
+	 * @return source file, or null if could not be built
+	 */
+	public synchronized SourceFile getSourceFile(IFile file)
+	{
+		SourceFile sourceFile = sourceFiles.get(file);
+		if (sourceFile == null)
+			sourceFile = buildSourceFile(file);
+		return sourceFile;
+	}
+
+	/**
+	 * Completely rebuild the source file from its DOM
+	 * 
+	 * @param file
+	 * @return
+	 */
+	public synchronized SourceFile buildSourceFile(IFile file) {
+		SourceFile sourceFile = builder.buildSourceFile(file);
+		sourceFiles.put(file, sourceFile);
+		return sourceFile;
+	}
+	
+	public static synchronized XSLCore getInstance()
+	{
+		if (instance == null)
+			instance = new XSLCore();
+		return instance;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
index a0fa95e..19e4ef9 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
@@ -32,11 +32,10 @@
 		return type;
 	}
 	
-	public SourceFile getSourceFile()
+/*	public SourceFile getSourceFile()
 	{
 		// TODO this depends on the project settings and URIResolver
-		// TODO if we are in a Java src folder, and we are using RELATIVE file:// as the href, then we conclude its an error! 
 		IFile includedFile = parentSourceFile.getFile().getProject().getFile(new Path("xsl/"+href));
 		return parentSourceFile.sourceFiles.get(includedFile);
-	}
+	} */
 }
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
index 24c8777..9626083 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
@@ -23,16 +23,13 @@
 	private static final int IMPORT = 2;
 	
 	final IFile file;
-	final Map<IFile, SourceFile> sourceFiles;
 	final List<Include> includes = new ArrayList<Include>();
 	final List<Template> namedTemplates = new ArrayList<Template>();
 	final List<Template> calledTemplates = new ArrayList<Template>();
 
-	public SourceFile(Map<IFile, SourceFile> sourceFiles, IFile file)
+	public SourceFile(IFile file)
 	{
 		this.file = file;
-		this.sourceFiles = sourceFiles;
-		sourceFiles.put(file,this);
 	}
 
 	public void addInclude(Include include)
@@ -59,12 +56,7 @@
 	{
 		return file;
 	}
-
-	public Map<IFile, SourceFile> getSourceFiles()
-	{
-		return sourceFiles;
-	}
-
+	
 	public List<Include> getIncludes()
 	{
 		return includes;
@@ -114,11 +106,11 @@
 				}
 			}			
 		}
-		for (Include include : includes)
+	/*	for (Include include : includes)
 		{
 			// for includes, just add all templates
 			SourceFile sf = include.getSourceFile();
 			sf.calculateTemplates(templateMap,include.getType());
-		}		
+		}	*/	
 	}
 }
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java
new file mode 100644
index 0000000..03df442
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java
@@ -0,0 +1,149 @@
+package org.eclipse.wst.xsl.core.internal.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xsl.core.XSLCorePlugin;
+import org.w3c.dom.Attr;
+import org.w3c.dom.NodeList;
+
+public class SourceFileBuilder {
+	private XPathExpression xpathInclude;
+	private XPathExpression xpathImport;
+	private XPathExpression xpathTemplate;
+	private XPathExpression xpathCallTemplate;
+
+	public SourceFileBuilder() {
+		XPath xpath = XPathFactory.newInstance().newXPath();
+		xpath.setNamespaceContext(new NamespaceContext() {
+
+			@Override
+			public String getNamespaceURI(String arg0) {
+				if ("xsl".equals(arg0))
+					return XSLCorePlugin.XSLT_NS;
+				return null;
+			}
+
+			@Override
+			public String getPrefix(String arg0) {
+				if (XSLCorePlugin.XSLT_NS.equals(arg0))
+					return "xsl";
+				return null;
+			}
+
+			@Override
+			public Iterator getPrefixes(String arg0) {
+				if (XSLCorePlugin.XSLT_NS.equals(arg0)) {
+					List list = new ArrayList();
+					list.add("xsl");
+					return list.iterator();
+				}
+				return null;
+			}
+
+		});
+		try {
+			xpathInclude = xpath.compile("/xsl:stylesheet/xsl:include");
+			xpathImport = xpath.compile("/xsl:stylesheet/xsl:import");
+			xpathTemplate = xpath.compile("/xsl:stylesheet/xsl:template");
+			xpathCallTemplate = xpath.compile("/xsl:stylesheet/xsl:template//xsl:call-template");
+		} catch (XPathExpressionException e) {
+			XSLCorePlugin.log(e);
+		}
+	}
+
+	/**
+	 * 
+	 * @param file
+	 * @return a source file, or null if creation failed
+	 */
+	public SourceFile buildSourceFile(IFile file) {
+		SourceFile sf = null;
+		IStructuredModel smodel = null;
+		try {
+			smodel = StructuredModelManager.getModelManager().getModelForRead(file);
+			if (smodel instanceof IDOMModel) {
+				IDOMModel model = (IDOMModel) smodel;
+				sf = parseModel(model,file);
+			}
+		} catch (IOException e) {
+			XSLCorePlugin.log(e);
+		} catch (CoreException e) {
+			XSLCorePlugin.log(e);
+		} finally {
+			if (smodel != null)
+				smodel.releaseFromRead();
+		}
+		return sf;
+	}
+
+	private SourceFile parseModel(IDOMModel model, IFile file) {
+		IDOMDocument document = model.getDocument();
+		SourceFile sf = new SourceFile(file);
+		try {
+			NodeList includeNodes = (NodeList) xpathInclude.evaluate(document,XPathConstants.NODESET);
+			for (int i = 0; i < includeNodes.getLength(); i++) {
+				IDOMNode node = (IDOMNode) includeNodes.item(i);
+				Attr att = (Attr) node.getAttributes().getNamedItem("href");
+				String href = att == null ? null : att.getValue();
+				Include inc = new Include(sf, href, Include.INCLUDE);
+				configure(node, inc, document.getStructuredDocument());
+				sf.addInclude(inc);
+			}
+			NodeList importNodes = (NodeList) xpathImport.evaluate(document,XPathConstants.NODESET);
+			for (int i = 0; i < importNodes.getLength(); i++) {
+				IDOMNode node = (IDOMNode) importNodes.item(i);
+				Attr att = (Attr) node.getAttributes().getNamedItem("href");
+				String href = att == null ? null : att.getValue();
+				Include inc = new Include(sf, href, Include.IMPORT);
+				configure(node, inc, document.getStructuredDocument());
+				sf.addInclude(inc);
+			}
+			NodeList templateNodes = (NodeList) xpathTemplate.evaluate(document, XPathConstants.NODESET);
+			for (int i = 0; i < templateNodes.getLength(); i++) {
+				IDOMNode node = (IDOMNode) templateNodes.item(i);
+				Attr att = (Attr) node.getAttributes().getNamedItem("name");
+				String name = att == null ? null : att.getValue();
+				if (name != null) {
+					Template template = new Template(sf, name);
+					configure(node, template, document.getStructuredDocument());
+					sf.addNamedTemplate(template);
+				}
+			}
+		} catch (XPathExpressionException e) {
+			XSLCorePlugin.log(e);
+		}
+		return sf;
+	}
+
+	private void configure(IDOMNode node, SourceArtifact inc, IStructuredDocument structuredDocument) {
+		try {
+			int line = structuredDocument.getLineOfOffset(node.getStartOffset());
+			int lineOffset = structuredDocument.getLineOffset(line);
+			int col = node.getStartOffset() - lineOffset;
+			inc.setLineNumber(line);
+			inc.setColumnNumber(col);
+		} catch (BadLocationException e) {
+			XSLCorePlugin.log(e);
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/XSLModel.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/XSLModel.java
deleted file mode 100644
index 56d58e2..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/XSLModel.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.model;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-
-
-public class XSLModel
-{
-	private final long lastBuildTime;
-	private final IProject project;
-	private final Map<IFile, SourceFile> sourceFiles;
-	
-	public XSLModel(IProject project, Map<IFile, SourceFile> sourceFiles)
-	{
-		this.lastBuildTime = System.currentTimeMillis();
-		this.project = project;
-		this.sourceFiles = sourceFiles;
-	}
-	
-	public IProject getProject()
-	{
-		return project;
-	}
-	
-	// TODO sort out threading issues
-	public SourceFile getSourceFile(IFile file)
-	{
-		return sourceFiles.get(file);
-	}
-	
-	public long getLastBuildTime()
-	{
-		return lastBuildTime;
-	}
-
-	// TODO sort out threading issues
-	public Map<IFile, SourceFile> getSourceFiles()
-	{
-		return sourceFiles;
-	}
-}
-
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
index 73b1942..c8791be 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
@@ -10,139 +10,144 @@
  *******************************************************************************/
 package org.eclipse.wst.xsl.core.internal.validation;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
 import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xsl.core.XSLCorePlugin;
-import org.eclipse.wst.xsl.core.internal.model.Include;
-import org.eclipse.wst.xsl.core.internal.model.SourceArtifact;
+import org.eclipse.wst.xsl.core.XSLCore;
 import org.eclipse.wst.xsl.core.internal.model.SourceFile;
-import org.eclipse.wst.xsl.core.internal.model.Template;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NodeList;
 
 public class XSLValidator {
 	private static XSLValidator instance;
-	private XPathExpression xpathInclude;
-	private XPathExpression xpathImport;
-	private XPathExpression xpathTemplate;
-	private XPathExpression xpathCallTemplate;
-	
+
 	private XSLValidator() {
 		System.out.println("XSLValidator ctor");
-		XPath xpath = XPathFactory.newInstance().newXPath();
-		xpath.setNamespaceContext(new NamespaceContext()
-		{
-
-			@Override
-			public String getNamespaceURI(String arg0) {
-				if ("xsl".equals(arg0))
-					return XSLCorePlugin.XSLT_NS;
-				return null;
-			}
-
-			@Override
-			public String getPrefix(String arg0) {
-				if (XSLCorePlugin.XSLT_NS.equals(arg0))
-					return "xsl";
-				return null;
-			}
-
-			@Override
-			public Iterator getPrefixes(String arg0) {
-				if (XSLCorePlugin.XSLT_NS.equals(arg0))
-				{
-					List list = new ArrayList();
-					list.add("xsl");
-					return list.iterator();
-				}
-				return null;
-			}
-			
-		});
-		try {
-			xpathInclude = xpath.compile("/xsl:stylesheet/xsl:include");
-			xpathImport = xpath.compile("/xsl:stylesheet/xsl:import");
-			xpathTemplate = xpath.compile("/xsl:stylesheet/xsl:template");
-			xpathCallTemplate = xpath.compile("/xsl:stylesheet/xsl:template//xsl:call-template");
-		} catch (XPathExpressionException e) {
-			XSLCorePlugin.log(e);
-		}
 	}
 
-	public ValidationReport validate(String uri, IFile xslFile, IDOMDocument document) {
+	public ValidationReport validate(String uri, IFile xslFile) throws CoreException {
+		SourceFile sourceFile = XSLCore.getInstance().buildSourceFile(xslFile);
 		ValidationInfo valinfo = new ValidationInfo(uri);
-		Map<IFile, SourceFile> allFiles = new HashMap<IFile, SourceFile>();
-		SourceFile sf = new SourceFile(allFiles,xslFile);
-		try {
-			NodeList includeNodes = (NodeList) xpathInclude.evaluate(document, XPathConstants.NODESET);
-			for (int i = 0; i < includeNodes.getLength(); i++) {
-				IDOMNode node = (IDOMNode)includeNodes.item(i);
-				Attr att = (Attr)node.getAttributes().getNamedItem("href");
-				String href = att == null ? null : att.getValue();
-				Include inc = new Include(sf,href,Include.INCLUDE);
-				configure(node,inc,document.getStructuredDocument());
-				sf.addInclude(inc);
-			}
-			NodeList importNodes = (NodeList) xpathImport.evaluate(document, XPathConstants.NODESET);
-			for (int i = 0; i < importNodes.getLength(); i++) {
-				IDOMNode node = (IDOMNode)importNodes.item(i);
-				Attr att = (Attr)node.getAttributes().getNamedItem("href");
-				String href = att == null ? null : att.getValue();
-				Include inc = new Include(sf,href,Include.IMPORT);
-				configure(node,inc,document.getStructuredDocument());
-				sf.addInclude(inc);
-			}
-			NodeList templateNodes = (NodeList) xpathTemplate.evaluate(document, XPathConstants.NODESET);
-			for (int i = 0; i < templateNodes.getLength(); i++) {
-				IDOMNode node = (IDOMNode)templateNodes.item(i);
-				Attr att = (Attr)node.getAttributes().getNamedItem("name");
-				String name = att == null ? null : att.getValue();
-				if (name != null)
-				{
-					Template template = new Template(sf,name);
-					configure(node,template,document.getStructuredDocument());
-					sf.addNamedTemplate(template);
-				}
-			}
-		} catch (XPathExpressionException e) {
-			XSLCorePlugin.log(e);
-		}
-//		valinfo.addError("INCLUDE", line, col, uri);
+		calculateProblems(sourceFile,valinfo);
 		return valinfo;
 	}
-	
-	private void configure(IDOMNode node, SourceArtifact inc, IStructuredDocument structuredDocument) {
-		try {
-			int line = structuredDocument.getLineOfOffset(node.getStartOffset());
-			int lineOffset = structuredDocument.getLineOffset(line);
-			int col = node.getStartOffset() - lineOffset;				
-			inc.setLineNumber(line);
-			inc.setColumnNumber(col);
-		} catch (BadLocationException e) {
-			XSLCorePlugin.log(e);
-		}
-	}
 
-	public static XSLValidator getInstance()
+	private void calculateProblems(SourceFile sourceFile, ValidationInfo valinfo) throws CoreException
 	{
+		// TODO these need to be real preferences
+/*		int REPORT_EMPTY_PARAM_PREF = PROBLEM_ERROR;
+		int REPORT_MISSING_PARAM_PREF = PROBLEM_WARN;
+		for (final SourceFile sf : sourceFilesToBuild.values())
+		{
+			Map<String,List<Template>> templateMap = sf.calculateTemplates();
+			// check for missing called templates
+			for (Template calledTemplate : sf.getCalledTemplates())
+			{
+				List<Template> templateList = templateMap.get(calledTemplate.getName());
+				if (templateList == null)
+				{
+					createMarker(calledTemplate,IMarker.SEVERITY_ERROR,"Missing template: "+calledTemplate.getName());
+				}
+				else if (templateList.size() == 1)
+				{
+					Template namedTemplate = templateList.get(0);
+					for (Parameter calledTemplateParam : calledTemplate.getParameters())
+					{
+						boolean found = false;
+						for (Parameter namedTemplateParam : namedTemplate.getParameters())
+						{
+							if (calledTemplateParam.getName().equals(namedTemplateParam.getName()))
+							{
+								found = true;								
+								if (REPORT_EMPTY_PARAM_PREF > PROBLEM_IGNORE && !namedTemplateParam.isValue() && !calledTemplateParam.isValue())
+									createMarker(calledTemplateParam,REPORT_EMPTY_PARAM_PREF,"Parameter does not have default value: "+calledTemplateParam.getName());
+								break;
+							}
+						}
+						if (!found)
+							createMarker(calledTemplateParam,IMarker.SEVERITY_ERROR,"Parameter does not exist: "+calledTemplateParam.getName());
+					}
+					if (REPORT_MISSING_PARAM_PREF > PROBLEM_IGNORE)
+					{
+						for (Parameter namedTemplateParam : namedTemplate.getParameters())
+						{
+							if (!namedTemplateParam.isValue())
+							{
+								boolean found = false;
+								for (Parameter calledTemplateParam : calledTemplate.getParameters())
+								{
+									if (calledTemplateParam.getName().equals(namedTemplateParam.getName()))
+									{
+										found = true;
+										break;
+									}
+								}
+								if (!found)
+									createMarker(calledTemplate,REPORT_MISSING_PARAM_PREF,"Missing parameter: "+namedTemplateParam.getName());
+							}
+						}
+					}
+				}
+			}
+			// check for duplicate templates
+			Set<Include> includesWithConflictingTemplates = new HashSet<Include>();
+			for (Map.Entry<String, List<Template>> entry : templateMap.entrySet())
+			{
+				List<Template> templateList = entry.getValue();
+				//System.out.println("------------------------------------");
+				//System.out.println(entry.getKey());
+				//System.out.println("------------------------------------");
+				//for (Template template : templateList)
+				//{
+				//	System.out.println(template.getParentSourceFile().getFile());
+				//}
+				if(templateList.size() > 1)
+				{ // more than one template with the same name exists
+					for (Template template : templateList)
+					{
+						if (template.getParentSourceFile().equals(sf))
+						{// duplicate template exists in this source file
+							createMarker(template,IMarker.SEVERITY_ERROR,"Duplicate template: "+template.getName());
+						}
+						else
+						{// duplicate template exists in imported templates
+							for (Include include : sf.getIncludes())
+							{
+								if (recurse(include.getSourceFile().getIncludes(),template))
+								{
+									includesWithConflictingTemplates.add(include);
+								}
+							}
+						}
+					}
+				}
+			}
+			for (Include include : includesWithConflictingTemplates)
+			{
+				createMarker(include,IMarker.SEVERITY_ERROR,"Conflicting includes: "+include.getSourceFile().getFile());
+			}
+		} */
+	}
+	
+/*	private boolean recurse(List<Include> includes, Template template) throws CoreException
+	{
+		boolean found = false;
+		for (Include include : includes)
+		{
+			if (include.getParentSourceFile().getNamedTemplates().contains(template))
+			{
+				found = true;
+			}
+			else
+			{
+				found = recurse(include.getSourceFile().getIncludes(),template);
+			}
+			if (found)
+				break;
+		}
+		return found;
+	}	
+*/	
+	public static XSLValidator getInstance() {
 		if (instance == null)
 			instance = new XSLValidator();
 		return instance;
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
index 308e781..72d63b4 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.wst.xsl.core.internal.validation.eclipse;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -18,11 +17,7 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
 import org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator;
 import org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
@@ -36,43 +31,26 @@
 		System.out.println("Validator ctor");
 	}
 
-	private IDOMModel getModelForResource(IFile file) throws IOException,
-			CoreException {
-		IStructuredModel model = null;
-		IModelManager manager = StructuredModelManager.getModelManager();
-		model = manager.getModelForRead(file);
-		return model instanceof IDOMModel ? (IDOMModel) model : null;
-	}
-
-	public ValidationReport validate(String uri, InputStream inputstream,
-			NestedValidatorContext context) {
+	public ValidationReport validate(String uri, InputStream inputstream, NestedValidatorContext context) {
 		ValidationReport valreport = null;
 		try {
-			IFile[] files = ResourcesPlugin.getWorkspace().getRoot()
-					.findFilesForLocationURI(new URI(uri));
+			IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(new URI(uri));
 			if (files.length > 0) {
 				IFile xslFile = files[0];
-				IDOMModel model = getModelForResource(xslFile);
-				if (model != null)
-					valreport = XSLValidator.getInstance().validate(uri,
-							xslFile, model.getDocument());
+				valreport = XSLValidator.getInstance().validate(uri, xslFile);
 			}
 		} catch (URISyntaxException e) {
 			XSLCorePlugin.log(e);
-		} catch (IOException e) {
-			XSLCorePlugin.log(e);
 		} catch (CoreException e) {
 			XSLCorePlugin.log(e);
 		}
 		return valreport;
 	}
 
-	// TODO whats this for?
-	protected void addInfoToMessage(ValidationMessage validationMessage,
-			IMessage message) {
+	// TODO which attributes to set
+	protected void addInfoToMessage(ValidationMessage validationMessage, IMessage message) {
 		String key = validationMessage.getKey();
-		message.setAttribute(COLUMN_NUMBER_ATTRIBUTE, new Integer(
-				validationMessage.getColumnNumber()));
+		message.setAttribute(COLUMN_NUMBER_ATTRIBUTE, new Integer(validationMessage.getColumnNumber()));
 		message.setAttribute(SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE, "hello");
 		message.setAttribute(SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE, "world");
 	}