This commit was manufactured by cvs2svn to create tag 'R1_0_2'.
diff --git a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
index 1f59675..975e202 100644
--- a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.jsp.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.jst.jsp.core.internal.JSPCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -26,9 +26,12 @@
  org.eclipse.jst.jsp.core.internal.provisional.contenttype,
  org.eclipse.jst.jsp.core.internal.provisional.text,
  org.eclipse.jst.jsp.core.internal.regions,
+ org.eclipse.jst.jsp.core.internal.taglib,
  org.eclipse.jst.jsp.core.internal.tasks,
  org.eclipse.jst.jsp.core.internal.text,
  org.eclipse.jst.jsp.core.internal.util,
+ org.eclipse.jst.jsp.core.internal.validation,
+ org.eclipse.jst.jsp.core.jspel,
  org.eclipse.jst.jsp.core.taglib
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources,
diff --git a/bundles/org.eclipse.jst.jsp.core/build.properties b/bundles/org.eclipse.jst.jsp.core/build.properties
index 9bcd78a..ae187ae 100644
--- a/bundles/org.eclipse.jst.jsp.core/build.properties
+++ b/bundles/org.eclipse.jst.jsp.core/build.properties
@@ -17,6 +17,6 @@
 bin.excludes = @dot/**,\
                temp.folder/**
 src.includes = component.xml,\
-               build.properties,\
-               DevTimeSupport/
+               DevTimeSupport/,\
+               schema/
 source.. = src/
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.properties b/bundles/org.eclipse.jst.jsp.core/plugin.properties
index b474eb2..9d662e3 100644
--- a/bundles/org.eclipse.jst.jsp.core/plugin.properties
+++ b/bundles/org.eclipse.jst.jsp.core/plugin.properties
@@ -18,3 +18,4 @@
 JSP_Syntax_Validator.name=JSP Syntax Validator
 EL_Syntax_Validator.name=EL Syntax Validator
 Structured_JSP_Document_Setup_participant.name=Structured JSP Document Setup Participant
+JSP_EL_Translator=JSP EL Translator
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.xml b/bundles/org.eclipse.jst.jsp.core/plugin.xml
index 0d76272..8684199 100644
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ b/bundles/org.eclipse.jst.jsp.core/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
 <plugin>
+   <extension-point id="elTranslator" name="%JSP_EL_Translator" schema="schema/eltranslator.exsd"/>
 
 	<extension point="org.eclipse.wst.sse.core.modelHandler">
 		<modelHandler
@@ -240,4 +241,11 @@
 			</contentTypeIdentifier>
 		</validator>
 	</extension>
+    <extension
+       point="org.eclipse.jst.jsp.core.elTranslator">
+       <elTranslator
+          class="org.eclipse.jst.jsp.core.internal.java.jspel.JSPELTranslator"
+          name="Default JSP 2.0 EL Translator"
+          id="org.eclipse.jst.jsp.defaultJSP20"/>
+    </extension>
 </plugin>
diff --git a/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd b/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd
new file mode 100644
index 0000000..34e412b
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd
@@ -0,0 +1,121 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jst.jsp.core">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jst.jsp.core" id="elTranslator" name="JSP EL Translator"/>
+      </appInfo>
+      <documentation>
+         Extension point to customer JSP Expression Language Generation
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="elTranslator"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A fully qualified identifier of the target extension point.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  An optional identifier of the extension instance.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  An optional name of the extension instance.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="elTranslator">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="name"/>
+         </appInfo>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Fully qualified class name for the EL Translator.  Must be an implementor of org.eclipse.jst.jsp.core.jspel.IJSPELTranslator.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  The name of the EL translator.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A unique string identifier for an EL Translator.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
index b517b45..8318040 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
@@ -79,7 +79,7 @@
 		super();
 	}
 
-	private void addNestablePrefix(JSPSourceParser parser, String tagName) {
+	protected void addNestablePrefix(JSPSourceParser parser, String tagName) {
 		TagMarker bm = new TagMarker(tagName);
 		parser.addNestablePrefix(bm);
 	}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ELProblem.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ELProblem.java
deleted file mode 100644
index b856058..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ELProblem.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jface.text.Position;
-
-public class ELProblem {
-	private Position fPos;
-	private String fMessage;
-	
-	public ELProblem(Position pos, String message)	{
-		fPos = pos;
-		fMessage = message;
-	}
-	
-	public String getMessage() {
-		return fMessage;
-	}
-	
-
-	public Position getPosition() {
-		return fPos;
-	}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
index 4807a43..41c770d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
@@ -25,27 +25,27 @@
 
 import org.eclipse.core.filebuffers.FileBuffers;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
 import org.eclipse.jst.jsp.core.internal.Logger;
 import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
 import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
 import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ASTExpression;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ELGenerator;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ParseException;
-import org.eclipse.jst.jsp.core.internal.java.jspel.Token;
-import org.eclipse.jst.jsp.core.internal.java.jspel.TokenMgrError;
 import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
 import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelper;
 import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager;
 import org.eclipse.jst.jsp.core.internal.taglib.TaglibVariable;
+import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
 import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
 import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
@@ -73,8 +73,22 @@
  * @author pavery
  */
 public class JSPTranslator {
+	
+	private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$ 
+
+	private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$ 
+
+	// Default EL Translator
+	private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$ 
+	
+	// handy plugin ID constant
+	private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$ 
+
 	// for debugging
 	private static final boolean DEBUG;
+
+	private IJSPELTranslator fELTranslator = null;
+	
 	static {
 		String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspjavamapping"); //$NON-NLS-1$
 		DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
@@ -148,7 +162,7 @@
 	protected final static int DECLARATION = 2;
 	protected final static int EXPRESSION = 4;
 	protected final static int SCRIPTLET = 8;
-
+	
 	/** used to avoid infinite looping include files */
 	private Stack fIncludes = null;
 	/** mostly for helper classes, so they parse correctly */
@@ -198,14 +212,18 @@
 	 */
 	private StringBuffer fJspTextBuffer = new StringBuffer();
 	
-	/**
-	 * JSP Expression Language Parser.
-	 */
-	private JSPELParser elParser = null;
 
+	/** 
+	 * List of EL problems to be translated
+	 */
 	private ArrayList fELProblems = new ArrayList();
 
 	/**
+	 * EL Translator ID
+	 */
+	private String fELTranslatorID;
+
+	/**
 	 * configure using an XMLNode
 	 * 
 	 * @param node
@@ -215,6 +233,10 @@
 
 		fProgressMonitor = monitor;
 		fStructuredModel = node.getModel();
+		String baseLocation = fStructuredModel.getBaseLocation();
+		
+		fELTranslatorID = getELTranslatorProperty(baseLocation);
+		
 		// fPositionNode = node;
 
 		fStructuredDocument = fStructuredModel.getStructuredDocument();
@@ -237,9 +259,9 @@
 		// when configured on a file
 		// fStructuredModel, fPositionNode, fModelQuery, fStructuredDocument
 		// are all null
-
 		fProgressMonitor = monitor;
-
+		
+		fELTranslatorID = getELTranslatorProperty(jspFile);
 		String className = createClassname(jspFile);
 		if (className.length() > 0) {
 			setClassname(className);
@@ -272,6 +294,45 @@
 	}
 
 	/**
+	 * Get the value of the ELTranslator property from a workspace relative 
+	 * path string
+	 * 
+	 * @param baseLocation Workspace-relative string path
+	 * @return Value of the ELTranslator property associated with the project.
+	 */
+	private String getELTranslatorProperty(String baseLocation){
+		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+		String elTranslatorValue = null;
+		IFile file = workspaceRoot.getFile(new Path(baseLocation));
+		elTranslatorValue = getELTranslatorProperty(file);
+		return elTranslatorValue;
+	}
+
+	/**
+	 * Get the value of the ELTranslator property from an IFile
+	 *  
+	 * @param file IFile 
+	 * @return Value of the ELTranslator property associated with the project.
+	 */
+	private String getELTranslatorProperty(IFile file) {
+		String elTranslatorValue = null;
+		try {
+			elTranslatorValue = file.getPersistentProperty(new QualifiedName(JSP_CORE_PLUGIN_ID, ELTRANSLATOR_PROP_NAME)); //$NON-NLS-1$
+		} catch (CoreException e) {
+			Logger.logException(e);
+		}
+		
+		if(null == elTranslatorValue) {
+			try {
+				elTranslatorValue = file.getProject().getPersistentProperty(new QualifiedName(JSP_CORE_PLUGIN_ID, ELTRANSLATOR_PROP_NAME)); //$NON-NLS-1$
+			} catch (CoreException e) {
+				Logger.logException(e);
+			}
+		}
+		return elTranslatorValue;
+	}
+
+	/**
 	 * @param node
 	 * @return
 	 */
@@ -1023,32 +1084,41 @@
 	}
 	/**
 	 * translates embedded containers for ALL attribute values
+	 * 
 	 * @param regions
 	 */
 	private void checkAllAttributeValueContainers(Iterator regions) {
 		// tag name is not jsp
 		// handle embedded jsp attributes...
 		ITextRegion embedded = null;
-		Iterator attrRegions = null;
-		ITextRegion attrChunk = null;
+		//Iterator attrRegions = null;
+		//ITextRegion attrChunk = null;
 		while (regions.hasNext()) {
 			embedded = (ITextRegion) regions.next();
 			if (embedded instanceof ITextRegionContainer) {
 				// parse out container
-				attrRegions = ((ITextRegionContainer) embedded).getRegions().iterator();
-				while (attrRegions.hasNext()) {
-					attrChunk = (ITextRegion) attrRegions.next();
-					String type = attrChunk.getType();
-					// embedded JSP in attribute support only want to translate one time per
-					// embedded region so we only translate on the JSP open tags (not content)
-					if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
-						// now call jsptranslate
-						translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
-					}
-				}
+				
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=130606
+				// fix exponential iteration problem w/ embedded expressions
+				translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
+//				attrRegions = ((ITextRegionContainer) embedded).getRegions().iterator();
+//				while (attrRegions.hasNext()) {
+//					attrChunk = (ITextRegion) attrRegions.next();
+//					String type = attrChunk.getType();
+//					// embedded JSP in attribute support only want to
+//					// translate one time per
+//					// embedded region so we only translate on the JSP open
+//					// tags (not content)
+//					if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
+//						// now call jsptranslate
+//						translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
+//						break;
+//					}
+//				}
 			}
 		}
 	}
+	
 	/**
 	 * translates embedded container for specified attribute
 	 * @param regions
@@ -1203,31 +1273,59 @@
  }
 
 	
-	private void translateEL(String elText, IStructuredDocumentRegion currentNode, int contentStart, int contentLength) {
-		if(null == elParser) {
-			elParser = JSPELParser.createParser(elText);
-		} else {
-			elParser.ReInit(elText);
+	private void translateEL(String elText, String delim, IStructuredDocumentRegion currentNode, int contentStart, int contentLength) {
+		IJSPELTranslator translator = getELTranslator();
+		if(null != translator) {
+			translator.translateEL(elText, delim, currentNode, contentStart, contentLength, fUserELExpressions, fUserELRanges, fStructuredDocument);
 		}
-		
-		try {
-			ASTExpression expression = elParser.Expression();
-			ELGenerator gen = new ELGenerator();
-			gen.generate(expression, fUserELExpressions, fUserELRanges, this, currentNode, contentStart, contentLength);
-		} catch (ParseException e) {
-			Token curTok = e.currentToken;
-			int problemStartOffset;
-			int problemEndOffset;
-			Position pos = null;
-			problemStartOffset =  contentStart + curTok.beginColumn;
-			problemEndOffset = contentStart + curTok.endColumn;
+	}
+	
+	/**
+	 * Discover and instantiate an EL translator.
+	 */
+	public IJSPELTranslator getELTranslator() {
+		if(fELTranslator == null) {
 			
-			pos = new Position(problemStartOffset, problemEndOffset - problemStartOffset + 1);
-			fELProblems.add(new ELProblem(pos, e.getLocalizedMessage()));
-		} catch (TokenMgrError te) {
-			Position pos = new Position(contentStart, contentLength);
-			fELProblems.add(new ELProblem(pos, JSPCoreMessages.JSPEL_Token));
+			IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
+					JSP_CORE_PLUGIN_ID, // name of plugin that exposes this extension point
+					EL_TRANSLATOR_EXTENSION_NAME); // - extension id
+
+			// Iterate over all declared extensions of this extension point.  
+			// A single plugin may extend the extension point more than once, although it's not recommended.
+			IConfigurationElement bestTranslator = null;
+			IExtension[] extensions = extensionPoint.getExtensions();
+			for(int curExtension=0; curExtension < extensions.length; curExtension++) {
+				IExtension extension = extensions[curExtension];
+				
+				IConfigurationElement[] translators = extension.getConfigurationElements();
+				for(int curTranslator = 0; curTranslator < translators.length; curTranslator++) {
+					
+					IConfigurationElement elTranslator = translators[curTranslator];
+					
+					if (!EL_TRANSLATOR_EXTENSION_NAME.equals(elTranslator.getName())) { // - name of configElement 
+						continue;
+					}
+					
+					String idString = elTranslator.getAttribute("id"); //$NON-NLS-1$
+					if(null != idString && idString.equals(fELTranslatorID) || 
+							(null == bestTranslator && DEFAULT_JSP_EL_TRANSLATOR_ID.equals(idString))) {
+						bestTranslator = elTranslator;
+					}
+				}
+			}
+
+			if(null != bestTranslator) {
+				try {
+					Object execExt = bestTranslator.createExecutableExtension("class"); //$NON-NLS-1$
+					if (execExt instanceof IJSPELTranslator) {
+						return fELTranslator = (IJSPELTranslator)execExt;
+					} 
+				} catch (CoreException e) {
+					Logger.logException(e);
+				}
+			}
 		}
+		return fELTranslator;
 	}
 
 	/**
@@ -1299,7 +1397,7 @@
 					translateDeclarationString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
 				} else if (type == DOMJSPRegionContexts.JSP_EL_OPEN) {
 					fLastJSPType = EXPRESSION;
-					translateEL(embeddedContainer.getText(content), fCurrentNode, contentStart, content.getLength());
+					translateEL(embeddedContainer.getText(content), embeddedContainer.getText(delim), fCurrentNode, contentStart, content.getLength());
 				}
 
 				// calculate relative offset in buffer
@@ -1703,8 +1801,11 @@
 		boolean isUseBean = false;
 		for (int i = 0; i < regions.size(); i++) {
 			r = regions.get(i);
-			if (r.getType() == DOMRegionContext.XML_TAG_NAME && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
-				isUseBean = true;
+			if(r.getType() == DOMRegionContext.XML_TAG_NAME) {
+				if (r.getTextLength() == 11 && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
+					isUseBean = true;
+				}
+				// break no matter what if you hit tagname
 				break;
 			}
 		}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
index 665e09f..462ae6f 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
@@ -13,7 +13,9 @@
 package org.eclipse.jst.jsp.core.internal.java.jspel;
 
 import java.util.Map;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslator;
+
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
 import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
 
 /**
@@ -36,8 +38,8 @@
      * @param contentStart 
      * @param contentLength 
      */
-    public void generate(ASTExpression root, StringBuffer result, Map codeMap, JSPTranslator translator, ITextRegionCollection jspReferenceRegion, int contentStart, int contentLength) {
-		ELGeneratorVisitor visitor = new ELGeneratorVisitor(result, codeMap, translator, jspReferenceRegion, contentStart);
+    public void generate(ASTExpression root, IStructuredDocumentRegion currentNode, StringBuffer result, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart, int contentLength) {
+		ELGeneratorVisitor visitor = new ELGeneratorVisitor(result, currentNode, codeMap, document, jspReferenceRegion, contentStart);
 		root.jjtAccept(visitor, null);
     }
 }
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
index dfd3cd2..8c92898 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
@@ -22,7 +22,8 @@
 import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
 import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
 import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslator;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
 import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
 
 public class ELGeneratorVisitor implements JSPELParserVisitor {
@@ -68,7 +69,7 @@
 	private Map fCodeMap;
 	private int fOffsetInUserCode;
 	private int methodCounter = 0;
-	private JSPTranslator fTranslator = null;
+	private IStructuredDocument fDocument = null;
 	private int fContentStart;
 	private static Map fOperatorMap;
 	
@@ -76,6 +77,8 @@
 	// contains a reference to a variable for which information is only available at runtime.
 	private boolean fCanGenerate = true;
 
+	private IStructuredDocumentRegion fCurrentNode;
+
 	/**
 	 * Tranlsation of XML-style operators to java
 	 */
@@ -98,13 +101,14 @@
 	 * @param jspReferenceRegion
 	 * @param contentStart
 	 */
-	public ELGeneratorVisitor(StringBuffer result, Map codeMap, JSPTranslator translator, ITextRegionCollection jspReferenceRegion, int contentStart)
+	public ELGeneratorVisitor(StringBuffer result, IStructuredDocumentRegion currentNode, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart)
 	{
 		fResult = result;
 		fCodeMap = codeMap;
 		fOffsetInUserCode = result.length();
 		fContentStart = contentStart;
-		fTranslator = translator;
+		fDocument = document;
+		fCurrentNode = currentNode;
 	}
 
 	/**
@@ -163,14 +167,14 @@
 	 * @return
 	 */
 	protected String genFunction(String fullFunctionName) {
-		TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fTranslator.getStructuredDocument());
+		TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fDocument);
 		int colonIndex = fullFunctionName.indexOf(':');
 		String prefix = fullFunctionName.substring(0, colonIndex);
 		String functionName = fullFunctionName.substring(colonIndex + 1);
 		if (docMgr == null)
 			return null;
 		
-		Iterator taglibs = docMgr.getCMDocumentTrackers(fTranslator.getCurrentNode().getStartOffset()).iterator();
+		Iterator taglibs = docMgr.getCMDocumentTrackers(fCurrentNode.getStartOffset()).iterator();
 		while (taglibs.hasNext()) {
 			TaglibTracker tracker = (TaglibTracker)taglibs.next();
 			if(tracker.getPrefix().equals(prefix)) {
@@ -345,6 +349,15 @@
 	 * Value node
 	 */
 	public Object visit(ASTValue node, Object data) {
+		if(node.jjtGetNumChildren() >= 2) {
+			if(node.jjtGetChild(0) instanceof ASTValuePrefix && node.jjtGetChild(1) instanceof ASTValueSuffix) {
+				ASTValuePrefix prefix = (ASTValuePrefix) node.jjtGetChild(0);
+				ASTValueSuffix suffix = (ASTValueSuffix) node.jjtGetChild(1);
+				if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken().image.equals("request")) {
+					append("((HTTPServletRequest)");
+				}
+			}
+		}
 		return node.childrenAccept(this, data);	
 	}
 
@@ -388,8 +401,21 @@
 		} else if(null != node.getPropertyNameToken()) {
 			Token suffix = node.getPropertyNameToken();
 			String ucaseName = suffix.image.substring(0, 1).toUpperCase() + suffix.image.substring(1, suffix.image.length()); 
+
+			// This is a special case.  Note that the type system, no matter how much type information
+			// we would have wouldn't give us the correct result.  We're looking for "pageContext.request" 
+			// here and will add a downcast to (HTTPServletRequest)
+			
 			append(node.firstToken);
 			append("get" + ucaseName + "()", suffix); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			SimpleNode parent = (SimpleNode) node.jjtGetParent();
+			if(suffix.image.equals("request") && parent instanceof ASTValue && //$NON-NLS-1$
+					parent.jjtGetParent() instanceof ASTUnaryExpression && parent.firstToken.image.equals("pageContext")) { //$NON-NLS-1$
+				append(")");
+			} 
+
+
 		} else {
 			append(node.firstToken);
 		}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
index 50fe376..74a473d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
@@ -372,7 +372,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -541,7 +541,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -621,7 +621,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
new file mode 100644
index 0000000..8ba5eb3
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2005 BEA Systems and others.
+ * 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:
+ *     BEA Systems - initial implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.jst.jsp.core.internal.java.jspel;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
+import org.eclipse.jst.jsp.core.jspel.ELProblem;
+import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+
+	
+public class JSPELTranslator implements IJSPELTranslator {
+	/**
+	 * JSP Expression Language Parser.
+	 */
+	private JSPELParser elParser = null;
+	
+	public List translateEL(String elText, String delim,
+			IStructuredDocumentRegion currentNode, int contentStart,
+			int contentLength, StringBuffer fUserELExpressions,
+			HashMap fUserELRanges, IStructuredDocument document) {
+		
+		ArrayList elProblems = new ArrayList();
+		
+		try {
+			synchronized(this) {
+				if(null == elParser) {
+					elParser = JSPELParser.createParser(elText);
+				} else {
+					elParser.ReInit(elText);
+				}
+			
+				ASTExpression expression = elParser.Expression();
+				ELGenerator gen = new ELGenerator();
+				gen.generate(expression, currentNode, fUserELExpressions, fUserELRanges, document, currentNode, contentStart, contentLength);
+			}
+		} catch (ParseException e) {
+			Token curTok = e.currentToken;
+			int problemStartOffset;
+			int problemEndOffset;
+			Position pos = null;
+			problemStartOffset =  contentStart + curTok.beginColumn;
+			problemEndOffset = contentStart + curTok.endColumn;
+			
+			pos = new Position(problemStartOffset, problemEndOffset - problemStartOffset + 1);
+			elProblems.add(new ELProblem(pos, e.getLocalizedMessage()));
+		} catch (TokenMgrError te) {
+			Position pos = new Position(contentStart, contentLength);
+			elProblems.add(new ELProblem(pos, JSPCoreMessages.JSPEL_Token));
+		}
+		return elProblems;
+	}
+}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
new file mode 100644
index 0000000..599903d
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2005 BEA Systems and others.
+ * 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:
+ *     BEA Systems - initial implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.jst.jsp.core.jspel;
+
+import org.eclipse.jface.text.Position;
+
+public class ELProblem {
+	private Position fPos;
+	private String fMessage;
+	
+	public ELProblem(Position pos, String message)	{
+		fPos = pos;
+		fMessage = message;
+	}
+	
+	public String getMessage() {
+		return fMessage;
+	}
+	
+
+	public Position getPosition() {
+		return fPos;
+	}
+}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java
new file mode 100644
index 0000000..17562e3
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2005 BEA Systems and others.
+ * 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:
+ *     BEA Systems - initial implementation
+ *     
+ *******************************************************************************/
+
+package org.eclipse.jst.jsp.core.jspel;
+
+import java.util.List;
+import java.util.HashMap;
+
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+
+public interface IJSPELTranslator {
+
+	/**
+	 * To override the EL translation, please see the extension point 
+	 * org.eclipse.jst.jsp.core.eltranslator.
+	 * 
+	 * @param elText  The text to be translated.
+	 * @param delim	The starting delimiter
+	 * @param currentNode The current IStructuredDocumentRegion
+	 * @param contentStart The starting offset of the EL to be translated
+	 * @param contentLength The length of the EL content to be translated
+	 * @param fUserELExpressions A string buffer to which generated code can be appended.
+	 *		The text appended here will be inserted into the generated class at the top level 
+	 *		not at the point in the JSP translation where the EL was found. 
+	 * 
+	 * @param fUserELRanges  Map of location ranges from JSP EL offsets to generated Java code.
+	 * @param document The structured document.
+	 * @return A list of ELProblems that describes any syntactic issues found.
+	 */
+	public List translateEL(String elText,
+			String delim,
+			IStructuredDocumentRegion currentNode, 
+			int contentStart,
+			int contentLength,
+			StringBuffer userELExpressions,
+			HashMap userELRanges,
+			IStructuredDocument document);
+}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
index 95ffb8f..04bd47b 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
@@ -11,15 +11,19 @@
  *******************************************************************************/
 package org.eclipse.jst.jsp.core.taglib;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Stack;
 
 import org.eclipse.core.filebuffers.FileBuffers;
@@ -49,6 +53,8 @@
 import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
 import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
 import org.eclipse.wst.sse.core.internal.util.JarUtilities;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
 import org.w3c.dom.Document;
 import org.w3c.dom.EntityReference;
 import org.w3c.dom.Node;
@@ -287,7 +293,7 @@
 		}
 
 		public String toString() {
-			return "TLDRecord: " + path + " <-> " + getURI(); //$NON-NLS-1$ //$NON-NLS-2$
+			return "TLDRecord: " + getURI() + " <-> " + path; //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 
@@ -446,15 +452,107 @@
 	void clear() {
 	}
 
+	private ITaglibRecord createCatalogRecord(String urlString) {
+		ITaglibRecord record = null;
+		if (urlString.toLowerCase(Locale.US).endsWith((".jar")) && urlString.startsWith("file:")) {
+			String fileLocation = null;
+			try {
+				URL url = new URL(urlString);
+				fileLocation = url.getFile();
+			}
+			catch (MalformedURLException e) {
+				// not worth reporting
+			}
+			if (fileLocation != null) {
+				JarRecord jarRecord = createJARRecord(fileLocation);
+				String[] entries = JarUtilities.getEntryNames(fileLocation);
+				for (int jEntry = 0; jEntry < entries.length; jEntry++) {
+					if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
+						if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
+							jarRecord.has11TLD = true;
+							InputStream contents = JarUtilities.getInputStream(fileLocation, entries[jEntry]);
+							if (contents != null) {
+								TaglibInfo info = extractInfo(fileLocation, contents);
+								jarRecord.info = info;
+							}
+							try {
+								contents.close();
+							}
+							catch (IOException e) {
+							}
+						}
+					}
+				}
+				if (jarRecord.has11TLD) {
+					if (_debugIndexCreation)
+						Logger.log(Logger.INFO_DEBUG, "created catalog record for " + urlString + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+					record = jarRecord;
+				}
+
+			}
+		}
+		else {
+			URL url = null;
+			ByteArrayInputStream cachedContents = null;
+			InputStream tldStream = null;
+			try {
+				url = new URL(urlString);
+				URLConnection connection = url.openConnection();
+				connection.setDefaultUseCaches(false);
+				tldStream = connection.getInputStream();
+			}
+			catch (Exception e1) {
+				Logger.logException(e1);
+			}
+
+			int c;
+			ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+			// array dim restriction?
+			byte bytes[] = new byte[2048];
+			try {
+				while ((c = tldStream.read(bytes)) >= 0) {
+					buffer.write(bytes, 0, c);
+				}
+				cachedContents = new ByteArrayInputStream(buffer.toByteArray());
+			}
+			catch (IOException ioe) {
+				// no cleanup can be done
+			}
+			finally {
+				try {
+					tldStream.close();
+				}
+				catch (IOException e) {
+				}
+			}
+
+			URLRecord urlRecord = null;
+			TaglibInfo info = extractInfo(urlString, cachedContents);
+			if (info != null) {
+				urlRecord = new URLRecord();
+				urlRecord.info = info;
+				urlRecord.baseLocation = urlString;
+				urlRecord.url = url; //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			try {
+				cachedContents.close();
+			}
+			catch (IOException e) {
+			}
+			record = urlRecord;
+		}
+		return record;
+	}
+
 	/**
 	 * @param resource
 	 * @return
 	 */
-	private ITaglibRecord createJARRecord(IResource jar) {
+	private JarRecord createJARRecord(IResource jar) {
 		return createJARRecord(jar.getLocation().toString());
 	}
 
-	private ITaglibRecord createJARRecord(String fileLocation) {
+	private JarRecord createJARRecord(String fileLocation) {
 		JarRecord record = new JarRecord();
 		record.location = new Path(fileLocation);
 		record.urlRecords = new ArrayList(0);
@@ -930,6 +1028,32 @@
 			record = (ITaglibRecord) fClasspathReferences.get(reference);
 		}
 
+		// Check the XML Catalog
+		if (record == null) {
+			ICatalog catalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
+			if (catalog != null) {
+				String resolvedString = null;
+				try {
+					// Check as system reference first
+					resolvedString = catalog.resolveSystem(reference);
+					// Check as URI
+					if (resolvedString == null || resolvedString.trim().length() == 0) {
+						resolvedString = catalog.resolveURI(reference);
+					}
+					// Check as public ID
+					if (resolvedString == null || resolvedString.trim().length() == 0) {
+						resolvedString = catalog.resolvePublic(reference, basePath);
+					}
+				}
+				catch (Exception e) {
+					Logger.logException(e);
+				}
+				if (resolvedString != null && resolvedString.trim().length() > 0) {
+					record = createCatalogRecord(resolvedString);
+				}
+			}
+		}
+
 		// If no records were found and no local-root applies, check ALL of
 		// the web.xml files as a fallback
 		if (record == null && fProject.getFullPath().toString().equals(getLocalRoot(basePath))) {
@@ -945,7 +1069,7 @@
 
 	void updateClasspathLibrary(String libraryLocation, int deltaKind) {
 		String[] entries = JarUtilities.getEntryNames(libraryLocation);
-		JarRecord libraryRecord = (JarRecord) createJARRecord(libraryLocation);
+		JarRecord libraryRecord = createJARRecord(libraryLocation);
 		fClasspathJars.put(libraryLocation, libraryRecord);
 		for (int i = 0; i < entries.length; i++) {
 			if (entries[i].equals(JarUtilities.JSP11_TAGLIB)) {
@@ -988,7 +1112,7 @@
 			Logger.log(Logger.INFO_DEBUG, "creating records for JAR " + jar.getFullPath()); //$NON-NLS-1$
 		String jarLocationString = jar.getLocation().toString();
 		String[] entries = JarUtilities.getEntryNames(jar);
-		JarRecord jarRecord = (JarRecord) createJARRecord(jar);
+		JarRecord jarRecord = createJARRecord(jar);
 		fJARReferences.put(jar.getFullPath().toString(), jarRecord);
 		for (int i = 0; i < entries.length; i++) {
 			if (entries[i].endsWith(".tld")) { //$NON-NLS-1$
@@ -1068,6 +1192,7 @@
 			DocumentProvider provider = new DocumentProvider();
 			provider.setInputStream(webxmlContents);
 			provider.setValidating(false);
+			provider.setRootElementName("web-app"); //$NON-NLS-1$
 			provider.setBaseReference(webxml.getParent().getLocation().toString());
 			document = provider.getDocument();
 		}
@@ -1104,16 +1229,53 @@
 				path = new Path(URIHelper.normalize(taglibLocation, webxml.getFullPath().toString(), getLocalRoot(webxml.getLocation().toString())));
 			}
 			if (path.segmentCount() > 1) {
-				IFile tldResource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-				if (tldResource.isAccessible()) {
-					ITLDRecord record = createTLDRecord(tldResource);
+				IFile resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+				if (resource.isAccessible()) {
+					ITaglibRecord record = null;
+					/*
+					 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=125960
+					 * 
+					 * Also support mappings to .jar files
+					 */
+					if (resource.getFileExtension().equalsIgnoreCase(("jar"))) {
+						JarRecord jarRecord = createJARRecord(resource);
+						String[] entries = JarUtilities.getEntryNames(resource);
+						for (int jEntry = 0; jEntry < entries.length; jEntry++) {
+							if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
+								if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
+									jarRecord.has11TLD = true;
+									InputStream contents = JarUtilities.getInputStream(resource, entries[jEntry]);
+									if (contents != null) {
+										TaglibInfo info = extractInfo(resource.getLocation().toString(), contents);
+										jarRecord.info = info;
+									}
+									try {
+										contents.close();
+									}
+									catch (IOException e) {
+									}
+								}
+							}
+						}
+						record = jarRecord;
+						// the stored URI should reflect the web.xml's value
+						jarRecord.info.uri = taglibUri;
+						if (_debugIndexCreation)
+							Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+					else {
+						TLDRecord tldRecord = createTLDRecord(resource);
+						record = tldRecord;
+						// the stored URI should reflect the web.xml's value
+						tldRecord.info.uri = taglibUri;
+						if (_debugIndexCreation)
+							Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + tldRecord.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
 					webxmlRecord.tldRecords.add(record);
 					getImplicitReferences(webxml.getFullPath().toString()).put(taglibUri, record);
-					if (_debugIndexCreation)
-						Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + record.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
 					TaglibIndex.fireTaglibRecordEvent(new TaglibRecordEvent(record, deltaKind));
 				}
 			}
 		}
 	}
-}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
index 8c6aa0a..879c78f 100644
--- a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.jsp.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
index 77a04bb..39858f5 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
@@ -1145,7 +1145,8 @@
 			}
 		}
 		
-		addTemplates(request, TemplateContextTypeIdsJSP.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsJSP.ALL, documentPosition);
 		return request;
 	}
 
@@ -1163,6 +1164,17 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
 		
@@ -1174,7 +1186,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -1184,8 +1196,7 @@
 			}
 		}
 	}
-
-
+	
 	protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
 		// ignore
 	}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
index f3214dc..e835787 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
  * 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
@@ -10,14 +10,24 @@
  *******************************************************************************/
 package org.eclipse.jst.jsp.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
 import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
@@ -30,12 +40,90 @@
  * JSPTemplateCompletionProcessor is asked for content assist proposals, the
  * jsp content assist processor has already set the context type for
  * templates.
- * 
- * @plannedfor 1.0
  */
 class JSPTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+	
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..1f4e9d1
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsp.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/provisional/StructuredTextViewerConfigurationJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/provisional/StructuredTextViewerConfigurationJSP.java
deleted file mode 100644
index e69de29..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/provisional/StructuredTextViewerConfigurationJSP.java
+++ /dev/null
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJava.java
deleted file mode 100644
index e69de29..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJava.java
+++ /dev/null
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java
deleted file mode 100644
index e69de29..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/ReconcileStepForJspTranslation.java
+++ /dev/null
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/StructuredTextReconcilingStrategyForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/StructuredTextReconcilingStrategyForJSP.java
deleted file mode 100644
index e69de29..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/reconcile/StructuredTextReconcilingStrategyForJSP.java
+++ /dev/null
diff --git a/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
index 8d88eb9..b14badc 100644
--- a/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.css.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.css.core.internal.CSSCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
index de4a0bc..9c5c7ee 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
@@ -124,7 +124,7 @@
 	 */
 	public boolean match(Element element, String pseudoName) {
 		int nSelectors = getLength();
-		selectorListLoop : for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
+		for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
 			// Check each Selector Lists
 			ICSSSelector selector = getSelector(iSelector);
 			if (selector.match(element, pseudoName))
diff --git a/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
index ccebc4a..06bc72a 100644
--- a/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.css.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.css.ui.internal.CSSUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
index adc2aa8..3984f31 100644
--- a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtd.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.dtd.core.internal.DTDCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
index d9bc439..eae2d7b 100644
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
+++ b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
@@ -662,6 +662,10 @@
 		// right before we attempt to open a stream
 		String physicalURI = idResolver.resolvePhysicalLocation(currentDTD.getName(), publicId, logicalURI);
 		result = new InputSource(logicalURI);
+		if(!(physicalURI == null || physicalURI.equals("") || URIHelper.hasProtocol(physicalURI)))
+		{
+		  physicalURI = "file:///" + physicalURI;
+		}
 		result.setByteStream(new LazyURLInputStream(physicalURI));
 		return result;
 	}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
index 989b57e..04904e5 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
@@ -30,7 +30,7 @@
 
 	List attributes = new ArrayList();
 
-	protected CMNode contentModel;
+	protected CMNode fContentModel;
 
 	public Element(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
 		super(dtdFile, flatNode, DTDRegionTypes.ELEMENT_TAG);
@@ -130,9 +130,12 @@
 	}
 
 	public void replaceContentModel(Object requestor, CMNode node) {
+		replaceContentModel(requestor, node.getNodeText());
+	}
+
+	public void replaceContentModel(Object requestor, String nodeText) {
 		int offset = 0;
 		int length = 0;
-		String nodeText = node.getNodeText();
 		CMNode contentModel = getContentModel();
 		if (contentModel != null) {
 			offset = contentModel.getStartOffset();
@@ -147,7 +150,7 @@
 	public void resolveRegions() {
 		// System.out.println("element node stream = " +
 		// tokenStream.getString());
-		contentModel = null;
+		fContentModel = null;
 		removeChildNodes();
 		RegionIterator iter = iterator();
 
@@ -159,22 +162,22 @@
 		while (iter.hasNext()) {
 			ITextRegion currentRegion = iter.next();
 
-			if (contentModel == null) {
+			if (fContentModel == null) {
 				if (currentRegion.getType().equals(DTDRegionTypes.NAME)) {
-					contentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
+					fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
 				}
 				else if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) {
-					contentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
+					fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
 				}
 				else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
-					contentModel = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
+					fContentModel = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
 				}
 			}
 
-			if (contentModel != null) {
+			if (fContentModel != null) {
 				if (!currentRegion.getType().equals(DTDRegionTypes.END_TAG)) {
 					// content model gets all regions except for the '>'
-					contentModel.addRegion(currentRegion);
+					fContentModel.addRegion(currentRegion);
 				}
 				else {
 					// if it is equal to the end tag, then don't add anymore
@@ -186,17 +189,17 @@
 			}
 
 		}
-		if (contentModel != null) {
-			appendChild(contentModel);
+		if (fContentModel != null) {
+			appendChild(fContentModel);
 			// this is the root element content so set it true
-			contentModel.setRootElementContent(true);
+			fContentModel.setRootElementContent(true);
 			// now tell the content model to resolve it's regions
-			contentModel.resolveRegions();
+			fContentModel.resolveRegions();
 
 		}
 	}
 
 	public void setContentModel(CMNode contentModel) {
-		this.contentModel = contentModel;
+		this.fContentModel = contentModel;
 	}
 }
diff --git a/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
index 1d26844..3dc3da7 100644
--- a/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtd.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.dtd.ui.internal.DTDUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java
index 736591d..db4936f 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java
@@ -18,13 +18,13 @@
 import org.eclipse.wst.dtd.core.internal.AttributeList;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
 import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddAttributeAction extends BaseAction {
 
-	public AddAttributeAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddAttributeAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java
index e03f0dc..784251a 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java
@@ -17,13 +17,13 @@
 import org.eclipse.wst.dtd.core.internal.DTDFile;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
 import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddAttributeListAction extends BaseAction {
 
-	public AddAttributeListAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddAttributeListAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java
index 303e916..e6c6976 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java
@@ -16,13 +16,13 @@
 
 
 import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddCommentAction extends BaseAction {
 
-	public AddCommentAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddCommentAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java
index caaf3b4..108a36a 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java
@@ -14,14 +14,14 @@
 
 import org.eclipse.wst.dtd.core.internal.DTDFile;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 import org.eclipse.wst.dtd.core.internal.util.DTDUniqueNameHelper;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
 
 
 public class AddElementAction extends BaseAction {
 
-	public AddElementAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddElementAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java
index 3176640..403026b 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java
@@ -18,13 +18,13 @@
 import org.eclipse.wst.dtd.core.internal.CMGroupNode;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
 import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddElementToContentModelAction extends BaseAction {
 
-	public AddElementToContentModelAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddElementToContentModelAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java
index 54be4d7..4b14bfc 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java
@@ -16,13 +16,13 @@
 
 
 import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddEntityAction extends BaseAction {
 
-	public AddEntityAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddEntityAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java
index 728fb3b..72e6e8e 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java
@@ -17,15 +17,13 @@
 import org.eclipse.wst.dtd.core.internal.CMGroupNode;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
 import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddGroupToContentModelAction extends BaseAction {
 
-	// private Object element;
-
-	public AddGroupToContentModelAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddGroupToContentModelAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java
index 1321726..fb1f071 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java
@@ -15,13 +15,13 @@
 package org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions;
 
 import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 
 
 public class AddNotationAction extends BaseAction {
 
-	public AddNotationAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddNotationAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public void run() {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java
index 53f9b07..4c38894 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java
@@ -16,13 +16,13 @@
 
 import org.eclipse.wst.dtd.core.internal.DTDFile;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 import org.eclipse.wst.dtd.core.internal.util.LabelValuePair;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
 
 
 public class AddParameterEntityReferenceAction extends BaseAction {
-	public AddParameterEntityReferenceAction(StructuredTextEditor editor, String label) {
-		super(editor, label);
+	public AddParameterEntityReferenceAction(DTDModelImpl model, String label) {
+		super(model, label);
 	}
 
 	public String getFirstExternalParameterEntity(DTDFile dtdFile) {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java
index 5c32081..158737c 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java
@@ -22,33 +22,29 @@
 import org.eclipse.ui.actions.SelectionListenerAction;
 import org.eclipse.wst.dtd.core.internal.DTDNode;
 import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 
 
 abstract public class BaseAction extends SelectionListenerAction {
 
 	protected IEditorActionBarContributor contextContributor;
-	private StructuredTextEditor fTextEditor;
+	private IStructuredModel fModel;
 
-	public BaseAction(StructuredTextEditor editor, String text) {
-		this(editor, text, null);
+	public BaseAction(IStructuredModel model, String text) {
+		this(model, text, null);
 	}
 
-	public BaseAction(StructuredTextEditor editor, String text, ImageDescriptor imageDesc) {
+	public BaseAction(IStructuredModel model, String text, ImageDescriptor imageDesc) {
 		super(text);
-		fTextEditor = editor;
+		fModel = model;
 		setImageDescriptor(imageDesc);
 	}
 
-	public IEditorActionBarContributor getContextContributor() {
-		return contextContributor;
-	}
-
-	public DTDNode getFirstNodeSelected() {
+	protected DTDNode getFirstNodeSelected() {
 		return getFirstNodeSelected(getStructuredSelection());
 	}
 
-	public DTDNode getFirstNodeSelected(IStructuredSelection selection) {
+	protected DTDNode getFirstNodeSelected(IStructuredSelection selection) {
 		Iterator iter = selection.iterator();
 		// DTDNode referencePoint = null;
 		while (iter.hasNext()) {
@@ -60,15 +56,8 @@
 		return null;
 	}
 
-	public DTDModelImpl getModel() {
-		return (DTDModelImpl) getTextEditor().getModel();
-	}
-
-	/**
-	 * @return Returns the textEditor.
-	 */
-	public StructuredTextEditor getTextEditor() {
-		return fTextEditor;
+	protected DTDModelImpl getModel() {
+		return (DTDModelImpl) fModel;
 	}
 
 	public void setContextContributor(IEditorActionBarContributor contributor) {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java
new file mode 100644
index 0000000..5523965
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.wst.dtd.core.internal.CMNode;
+import org.eclipse.wst.dtd.core.internal.DTDNode;
+import org.eclipse.wst.dtd.core.internal.Element;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
+
+public class ReplaceEmptyContentModelWithGroupAction extends BaseAction {
+
+	public ReplaceEmptyContentModelWithGroupAction(DTDModelImpl model, String label) {
+		super(model, label);
+	}
+
+	public void run() {
+		DTDNode node = getFirstNodeSelected();
+		if (node instanceof Element) {
+			CMNode contentModel = ((Element) node).getContentModel();
+			if (CMNode.EMPTY.equals(contentModel.getType())) {
+				getModel().beginRecording(this, getText());
+				((Element) node).replaceContentModel(this, "()"); //$NON-NLS-1$
+				getModel().endRecording(this);
+			}
+		}
+	}
+
+	protected boolean updateSelection(IStructuredSelection selection) {
+		boolean rc = super.updateSelection(selection);
+		DTDNode node = getFirstNodeSelected(selection);
+		setEnabled(node instanceof Element);
+		return rc;
+	}
+}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
index d3ac8b8..ce87173 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
@@ -29,6 +29,7 @@
 import org.eclipse.wst.common.ui.internal.dnd.ObjectTransfer;
 import org.eclipse.wst.common.ui.internal.dnd.ViewerDragAdapter;
 import org.eclipse.wst.common.ui.internal.dnd.ViewerDropAdapter;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
 import org.eclipse.wst.dtd.ui.internal.dnd.DTDDragAndDropManager;
 import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
@@ -122,14 +123,15 @@
 	 * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getMenuListener(org.eclipse.jface.viewers.TreeViewer)
 	 */
 	public IMenuListener getMenuListener(TreeViewer viewer) {
-		if (fMenuHelper == null) {
-			// fMenuHelper = new DTDContextMenuHelper(getEditor());
-			// System.out.println("DTDContextMenuHelper not implemented");
-			// //$NON-NLS-1$
+		IMenuListener listener = null;
+		if (fMenuHelper == null && viewer.getInput() instanceof DTDModelImpl) {
+			fMenuHelper = new DTDContextMenuHelper((DTDModelImpl) viewer.getInput());
+			fMenuHelper.createMenuListenersFor(viewer);
 		}
-		// fMenuHelper.createMenuListenersFor(viewer);
-		// return fMenuHelper.getMenuListener();
-		return null;
+		if (fMenuHelper != null) {
+			listener = fMenuHelper.getMenuListener();
+		}
+		return listener;
 	}
 
 	/*
@@ -227,7 +229,8 @@
 		super.unconfigure(viewer);
 		fViewerContributions.remove(viewer);
 		if (fMenuHelper != null) {
-			// fMenuHelper.removeMenuListenersFor(viewer);
+			fMenuHelper.removeMenuListenersFor(viewer);
+			fMenuHelper = null;
 		}
 	}
 }
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
index 76bff7c..5dfc6ba 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
@@ -13,70 +13,115 @@
 
 package org.eclipse.wst.dtd.ui.views.contentoutline;
 
-/**
- * Menu helper for Content Outline page.  This should not be used elsewhere.
- */
-class DTDContextMenuHelper // extends FocusAdapter
-{
-/*
+import java.util.ArrayList;
+import java.util.List;
 
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.wst.dtd.core.internal.AttributeList;
+import org.eclipse.wst.dtd.core.internal.CMGroupNode;
+import org.eclipse.wst.dtd.core.internal.CMNode;
+import org.eclipse.wst.dtd.core.internal.DTDFile;
+import org.eclipse.wst.dtd.core.internal.DTDNode;
+import org.eclipse.wst.dtd.core.internal.Element;
+import org.eclipse.wst.dtd.core.internal.NodeList;
+import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
+import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
+import org.eclipse.wst.dtd.core.internal.util.LabelValuePair;
+import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
+import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
+import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddAttributeAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddAttributeListAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddCommentAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddElementAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddElementToContentModelAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddEntityAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddGroupToContentModelAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddNotationAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddParameterEntityReferenceAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.DeleteAction;
+import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.ReplaceEmptyContentModelWithGroupAction;
+
+/**
+ * Menu helper for Content Outline page. This should not be used elsewhere.
+ */
+class DTDContextMenuHelper {
 	class DTDMenuListener implements IMenuListener {
 		public void menuAboutToShow(IMenuManager manager) {
-			updateActions();
-			Object node = null;
-			IContentOutlinePage outline = (IContentOutlinePage) DTDContextMenuHelper.this.fEditor.getAdapter(IContentOutlinePage.class);
-			ISelection selection = outline.getSelection();
-			if (selection instanceof IStructuredSelection) {
-				node = ((IStructuredSelection) selection).getFirstElement();
-			}
-			if (node == null && selection instanceof ITextSelection) {
-				node = fEditor.getModel().getIndexedRegion(((ITextSelection) selection).getOffset());
-			}
-			if (node != null) {
-				addActionItemsForSelection(node, manager);
+			// update the action selection now
+			addNotationAction.selectionChanged(fViewerSelection);
+			addEntityAction.selectionChanged(fViewerSelection);
+			addElementAction.selectionChanged(fViewerSelection);
+			addCommentAction.selectionChanged(fViewerSelection);
+			addParameterEntityReferenceAction.selectionChanged(fViewerSelection);
+			deleteAction.selectionChanged(fViewerSelection);
+			addAttributeAction.selectionChanged(fViewerSelection);
+			addAttributeListAction.selectionChanged(fViewerSelection);
+			addGroupToContentModelAction.selectionChanged(fViewerSelection);
+			addElementToContentModelAction.selectionChanged(fViewerSelection);
+			replaceEmptyContentModelWithGroupAction.selectionChanged(fViewerSelection);
+
+
+			if (!fViewerSelection.isEmpty()) {
+				addActionItemsForSelection(fViewerSelection.getFirstElement(), manager);
 			}
 		}
 	}
 
-	private AddAttributeAction addAttributeAction;
-	private AddAttributeListAction addAttributeListAction;
-	private AddCommentAction addCommentAction;
-	private AddElementAction addElementAction;
-	private AddElementToContentModelAction addElementToContentModelAction;
-	private AddEntityAction addEntityAction;
-	private AddGroupToContentModelAction addGroupToContentModelAction;
-	private AddNotationAction addNotationAction;
-	private AddParameterEntityReferenceAction addParameterEntityReferenceAction;
-	private DeleteAction deleteAction;
+	class ViewerSelectionChangeListener implements ISelectionChangedListener {
+		public void selectionChanged(SelectionChangedEvent event) {
+			_selectionChanged(event);
+		}
+	}
 
-	// default access, for inner class
-	IEditorPart fEditor;
+	AddAttributeAction addAttributeAction;
+
+	AddAttributeListAction addAttributeListAction;
+	AddCommentAction addCommentAction;
+	AddElementAction addElementAction;
+	AddElementToContentModelAction addElementToContentModelAction;
+	AddEntityAction addEntityAction;
+	AddGroupToContentModelAction addGroupToContentModelAction;
+	AddNotationAction addNotationAction;
+	AddParameterEntityReferenceAction addParameterEntityReferenceAction;
+	DeleteAction deleteAction;
+	private ISelectionChangedListener fInternalSelectionChangedListener = new ViewerSelectionChangeListener();
 
 	private IMenuListener fMenuListener;
-	private IAction redoAction;
+	private DTDModelImpl fModel;
+	private List fViewerList;
 
-	// protected CutAction cutAction;
-	// protected CopyAction copyAction;
-	// protected PasteAction pasteAction;
-	private IAction undoAction;
+	IStructuredSelection fViewerSelection = StructuredSelection.EMPTY;
 
-	// private List viewerList = new Vector();
+	ReplaceEmptyContentModelWithGroupAction replaceEmptyContentModelWithGroupAction;
 
-	public DTDContextMenuHelper(IEditorPart editor) {
-		this.fEditor = editor;
+	public DTDContextMenuHelper(DTDModelImpl model) {
+		fModel = model;
+		fViewerList = new ArrayList(1);
 		fMenuListener = new DTDMenuListener();
-		addNotationAction = new AddNotationAction(editor, DTDUIMessages._UI_ACTION_ADD_DTD_NOTATION); //$NON-NLS-1$
-		addEntityAction = new AddEntityAction(editor, DTDUIMessages._UI_ACTION_ADD_DTD_ENTITY); //$NON-NLS-1$
-		addElementAction = new AddElementAction(editor, DTDUIMessages._UI_ACTION_ADD_DTD_ELEMENT); //$NON-NLS-1$
-		addCommentAction = new AddCommentAction(editor, DTDUIMessages._UI_ACTION_ADD_DTD_COMMENT); //$NON-NLS-1$
 
-		addParameterEntityReferenceAction = new AddParameterEntityReferenceAction(editor, DTDUIMessages._UI_ACTION_ADD_PARAM_ENTITY_REF); //$NON-NLS-1$
+		addNotationAction = new AddNotationAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_NOTATION); //$NON-NLS-1$
+		addEntityAction = new AddEntityAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_ENTITY); //$NON-NLS-1$
+		addElementAction = new AddElementAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_ELEMENT); //$NON-NLS-1$
+		addCommentAction = new AddCommentAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_COMMENT); //$NON-NLS-1$
+
+		addParameterEntityReferenceAction = new AddParameterEntityReferenceAction(model, DTDUIMessages._UI_ACTION_ADD_PARAM_ENTITY_REF); //$NON-NLS-1$
 		deleteAction = new DeleteAction(DTDUIMessages._UI_ACTION_DTD_DELETE); //$NON-NLS-1$
-		addAttributeAction = new AddAttributeAction(editor, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTE); //$NON-NLS-1$
-		addAttributeListAction = new AddAttributeListAction(editor, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTELIST); //$NON-NLS-1$
+		addAttributeAction = new AddAttributeAction(model, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTE); //$NON-NLS-1$
+		addAttributeListAction = new AddAttributeListAction(model, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTELIST); //$NON-NLS-1$
 
-		addGroupToContentModelAction = new AddGroupToContentModelAction(editor, DTDUIMessages._UI_ACTION_GROUP_ADD_GROUP); //$NON-NLS-1$
-		addElementToContentModelAction = new AddElementToContentModelAction(editor, DTDUIMessages._UI_ACTION_ADD_ELEMENT); //$NON-NLS-1$
+		addGroupToContentModelAction = new AddGroupToContentModelAction(model, DTDUIMessages._UI_ACTION_GROUP_ADD_GROUP); //$NON-NLS-1$
+		addElementToContentModelAction = new AddElementToContentModelAction(model, DTDUIMessages._UI_ACTION_ADD_ELEMENT); //$NON-NLS-1$
+
+		replaceEmptyContentModelWithGroupAction = new ReplaceEmptyContentModelWithGroupAction(model, DTDUIMessages._UI_ACTION_GROUP_ADD_GROUP); //$NON-NLS-1$
 
 		addNotationAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_NOTATION));
 		addEntityAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_ENTITY));
@@ -103,18 +148,28 @@
 		addElementToContentModelAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ELEMENTTOCONMODEL));
 		addElementToContentModelAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ELEMENTTOCONMODEL));
 		addElementToContentModelAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ELEMENTTOCONMODEL));
+
+		// use the same images as addGroupToContentModelAction
+		replaceEmptyContentModelWithGroupAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_GROUPTOCONMODEL));
+		replaceEmptyContentModelWithGroupAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_GROUPTOCONMODEL));
+		replaceEmptyContentModelWithGroupAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_GROUPTOCONMODEL));
 	}
 
-	public void addActionItemsForSelection(Object selectedObject, IMenuManager menu) {
-		if (undoAction == null) {
-			undoAction = fEditor.getAction(ActionFactory.UNDO.getId());
-			redoAction = fEditor.getAction(ActionFactory.REDO.getId());
+	void _selectionChanged(SelectionChangedEvent event) {
+		/*
+		 * Save the selection so we only notify the actions when the menu is
+		 * shown
+		 */
+		ISelection selection = event.getSelection();
+		if (selection instanceof IStructuredSelection) {
+			fViewerSelection = (IStructuredSelection) selection;
 		}
+		else {
+			fViewerSelection = StructuredSelection.EMPTY;
+		}
+	}
 
-		menu.add(undoAction);
-		menu.add(redoAction);
-		menu.add(new Separator());
-
+	void addActionItemsForSelection(Object selectedObject, IMenuManager menu) {
 		if (selectedObject instanceof NodeList) {
 			// add appropriate menu to logical view
 			NodeList folder = (NodeList) selectedObject;
@@ -125,7 +180,7 @@
 				menu.add(addEntityAction);
 			}
 			else if (folder.getListType().equals(DTDRegionTypes.ELEMENT_TAG)) {
-				LabelValuePair[] availableEntities = ((DTDModelImpl) fEditor.getModel()).createParmEntityContentItems(null);
+				LabelValuePair[] availableEntities = fModel.createParmEntityContentItems(null);
 				addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
 
 				menu.add(addElementAction);
@@ -136,7 +191,7 @@
 			}
 		}
 		if (selectedObject instanceof DTDFile || selectedObject == null) {
-			LabelValuePair[] availableEntities = ((DTDModelImpl) fEditor.getModel()).createParmEntityContentItems(null);
+			LabelValuePair[] availableEntities = fModel.createParmEntityContentItems(null);
 			addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
 
 			menu.add(addElementAction);
@@ -151,10 +206,14 @@
 		if (selectedObject instanceof Element) {
 			Element dtdElement = (Element) selectedObject;
 
-			if (dtdElement.getContentModel() == null) {
+			CMNode contentModel = dtdElement.getContentModel();
+			if (contentModel == null) {
 				menu.add(addGroupToContentModelAction);
 				menu.add(addElementToContentModelAction);
 			}
+			else if (contentModel != null && CMNode.EMPTY.equals(contentModel.getType())) {
+				menu.add(replaceEmptyContentModelWithGroupAction);
+			}
 			// if (!(((Element)selectedObject).getContentModel() instanceof
 			// CMGroupNode))
 			// {
@@ -192,7 +251,7 @@
 		}
 	}
 
-	public void addEditActions(IMenuManager menu) {
+	void addEditActions(IMenuManager menu) {
 		// menu.add(undoAction);
 		// menu.add(redoAction);
 		// menu.add(new Separator());
@@ -202,82 +261,24 @@
 	}
 
 	public void createMenuListenersFor(Viewer viewer) {
-		viewer.addSelectionChangedListener(addNotationAction);
-		viewer.addSelectionChangedListener(addEntityAction);
-		viewer.addSelectionChangedListener(addElementAction);
-		viewer.addSelectionChangedListener(addCommentAction);
-		viewer.addSelectionChangedListener(addParameterEntityReferenceAction);
-		viewer.addSelectionChangedListener(deleteAction);
-		viewer.addSelectionChangedListener(addAttributeAction);
-		viewer.addSelectionChangedListener(addAttributeListAction);
-		viewer.addSelectionChangedListener(addGroupToContentModelAction);
-		viewer.addSelectionChangedListener(addElementToContentModelAction);
+		viewer.addSelectionChangedListener(fInternalSelectionChangedListener);
+		ISelection selection = viewer.getSelection();
+		if (selection instanceof IStructuredSelection) {
+			fViewerSelection = (IStructuredSelection) selection;
+		}
+		else {
+			fViewerSelection = StructuredSelection.EMPTY;
+		}
 
-		IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
-		addNotationAction.selectionChanged(selection);
-		addEntityAction.selectionChanged(selection);
-		addElementAction.selectionChanged(selection);
-		addParameterEntityReferenceAction.selectionChanged(selection);
-		deleteAction.selectionChanged(selection);
-		addAttributeAction.selectionChanged(selection);
-		addAttributeListAction.selectionChanged(selection);
-		addGroupToContentModelAction.selectionChanged(selection);
-		addElementToContentModelAction.selectionChanged(selection);
-
-		// viewer.addSelectionChangedListener(cutAction);
-		// viewer.addSelectionChangedListener(copyAction);
-		// viewer.addSelectionChangedListener(pasteAction);
-
-		// viewerList.add(viewer);
-		// viewer.getControl().addFocusListener(this);
-	}
-
-	public DeleteAction getDeleteAction() {
-		return deleteAction;
+		fViewerList.add(viewer);
 	}
 
 	public IMenuListener getMenuListener() {
 		return fMenuListener;
 	}
 
-	// public void focusGained(FocusEvent event)
-	// {
-	// updateSelection();
-	// }
-
 	public void removeMenuListenersFor(Viewer viewer) {
-		viewer.removeSelectionChangedListener(addNotationAction);
-		viewer.removeSelectionChangedListener(addEntityAction);
-		viewer.removeSelectionChangedListener(addElementAction);
-		viewer.removeSelectionChangedListener(addCommentAction);
-		viewer.removeSelectionChangedListener(addParameterEntityReferenceAction);
-		viewer.removeSelectionChangedListener(deleteAction);
-		viewer.removeSelectionChangedListener(addAttributeAction);
-		viewer.removeSelectionChangedListener(addAttributeListAction);
-		viewer.removeSelectionChangedListener(addGroupToContentModelAction);
-		viewer.removeSelectionChangedListener(addElementToContentModelAction);
+		viewer.removeSelectionChangedListener(fInternalSelectionChangedListener);
+		fViewerList.remove(viewer);
 	}
-
-	// Update all the actions for the viewer in focus
-	public void updateActions() {
-		// undoAction.update();
-		// redoAction.update();
-	}
-
-	public void updateEditActions(IActionBars actionBars) {
-		// if (actionBars != null)
-		// {
-		// actionBars.setGlobalActionHandler(IWorkbenchActionConstants.CUT,
-		// cutAction);
-		// actionBars.setGlobalActionHandler(IWorkbenchActionConstants.COPY,
-		// copyAction);
-		// actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PASTE,
-		// pasteAction);
-		// actionBars.setGlobalActionHandler(IWorkbenchActionConstants.UNDO,
-		// undoAction);
-		// actionBars.setGlobalActionHandler(IWorkbenchActionConstants.REDO,
-		// redoAction);
-		// }
-	}
-*/
 }
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
index f4c163d..5c605d4 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
@@ -37,7 +37,6 @@
 import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
 import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
 import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
 
 class DTDTreeContentProvider implements ITreeContentProvider, IDTDFileListener {
 
@@ -235,7 +234,12 @@
 	}
 
 	private boolean isVisibleNodeList(NodeList nodeList) {
-		return !nodeList.getListType().equals(DTDRegionTypes.ATTLIST_TAG);
+		/*
+		 * All NodesLists should be visible because you can momentarily have
+		 * an ATTLIST (for example) without a corresponding ELEMENT
+		 * declaration
+		 */
+		return true;// !nodeList.getListType().equals(DTDRegionTypes.ATTLIST_TAG);
 	}
 
 	public void nodeChanged(DTDNode node) {
diff --git a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
index e015586..a0c83a3 100644
--- a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon May 30 17:55:54 EDT 2005
+#Sat Jan 28 00:54:50 EST 2006
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -11,7 +11,7 @@
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
@@ -23,7 +23,7 @@
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
diff --git a/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
index 31b015e..e6b6b31 100644
--- a/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.html.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.html.core.internal.HTMLCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
index a8261d1..92311f0 100644
--- a/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.html.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.html.ui.internal.HTMLUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
index ff35669..f605ba6 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
  * 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
@@ -119,9 +119,20 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
-
+		
 		// if already adding template proposals for a certain context type, do
 		// not add again
 		if (!fTemplateContexts.contains(context)) {
@@ -130,7 +141,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -151,7 +162,8 @@
 
 	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
 		ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-		addTemplates(request, TemplateContextTypeIdsHTML.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsHTML.ALL, documentPosition);
 		return request;
 	}
 
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
index cc01530..1013fab 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
  * 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
@@ -10,14 +10,24 @@
  *******************************************************************************/
 package org.eclipse.wst.html.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
@@ -33,8 +43,88 @@
  * templates.
  */
 class HTMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..eef8962
--- /dev/null
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.html.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
index 9f9acc3..5be5741 100644
--- a/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.sse.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.sse.core.internal.SSECorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
index 32aa35a..7c0be57 100644
--- a/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.sse.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.sse.ui.internal.SSEUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
index 12b950f..fb20197 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
@@ -18,6 +18,7 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointManager;
 import org.eclipse.debug.core.model.IBreakpoint;
@@ -28,6 +29,8 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProviderExtension4;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
 import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
@@ -61,11 +64,12 @@
 	}
 
 	protected boolean createBreakpoints(int lineNumber) {
-		// Note: we'll always allow processing to continue, even
-		// for a "read only" IStorageEditorInput, for the ActiveScript
-		// debugger. But this means sometimes the ActiveScript provider
-		// might get an input from CVS or something that is not related
-		// to debugging.
+		/*
+		 * Note: we'll always allow processing to continue, even for a "read
+		 * only" IStorageEditorInput, for the ActiveScript debugger. But this
+		 * means sometimes the ActiveScript provider might get an input from
+		 * CVS or something that is not related to debugging.
+		 */
 
 		ITextEditor editor = getTextEditor();
 		IEditorInput input = editor.getEditorInput();
@@ -104,16 +108,18 @@
 		if (errors.size() > 0) {
 			Shell shell = editor.getSite().getShell();
 			MultiStatus allStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.INFO, (IStatus[]) errors.toArray(new IStatus[0]), SSEUIMessages.ManageBreakpoints_error_adding_message1, null); //$NON-NLS-1$
-			// show for conditions more severe than INFO or when no
-			// breakpoints were created
+			/*
+			 * Show for conditions more severe than INFO or when no
+			 * breakpoints were created
+			 */
 			if (allStatus.getSeverity() > IStatus.INFO || getBreakpoints(getMarkers()).length < 1) {
 				ErrorDialog.openError(shell, SSEUIMessages.ManageBreakpoints_error_adding_title1, SSEUIMessages.ManageBreakpoints_error_adding_message1, allStatus); //$NON-NLS-1$ //$NON-NLS-2$
 				return false;
 			}
 		}
 		/*
-		 * Although no errors were reported, no breakpoints exist on this
-		 * line. Run the fallback action.
+		 * Although no errors were reported, no breakpoints exist on this line
+		 * after having run the existing providers. Run the fallback action.
 		 */
 		else if (fFallbackAction != null && !hasMarkers()) {
 			if (fFallbackAction instanceof ISelectionListener) {
@@ -127,16 +133,35 @@
 	protected String getContentType(IDocument document) {
 		IModelManager mgr = StructuredModelManager.getModelManager();
 		String contentType = null;
-		IStructuredModel model = null;
-		try {
-			model = mgr.getExistingModelForRead(document);
-			if (model != null) {
-				contentType = model.getContentTypeIdentifier();
+
+		IDocumentProvider provider = fTextEditor.getDocumentProvider();
+		if (provider instanceof IDocumentProviderExtension4) {
+			try {
+				IContentType type = ((IDocumentProviderExtension4) provider).getContentType(fTextEditor.getEditorInput());
+				if (type != null)
+					contentType = type.getId();
+			}
+			catch (CoreException e) {
+				/*
+				 * A failure accessing the underlying store really isn't
+				 * interesting, although it can be a problem for
+				 * IStorageEditorInputs.
+				 */
 			}
 		}
-		finally {
-			if (model != null) {
-				model.releaseFromRead();
+
+		if (contentType == null) {
+			IStructuredModel model = null;
+			try {
+				model = mgr.getExistingModelForRead(document);
+				if (model != null) {
+					contentType = model.getContentTypeIdentifier();
+				}
+			}
+			finally {
+				if (model != null) {
+					model.releaseFromRead();
+				}
 			}
 		}
 		return contentType;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java
index 06dc1e6..60adbff 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java
@@ -246,6 +246,10 @@
 	private final boolean DEBUG = false;
 	private final StyleRange[] EMPTY_STYLE_RANGE = new StyleRange[0];
 	private static final String LINE_STYLE_PROVIDER_EXTENDED_ID = "linestyleprovider"; //$NON-NLS-1$
+	private static final int MAX_NUMBER_STYLES = 500;
+	private static final int LEFT_STYLES_SIZE = 200;
+	private static final int RIGHT_STYLES_SIZE = 200;
+	private static final int MIDDLE_STYLES_SIZE = 1;
 
 	private IPropertyChangeListener fForegroundScaleListener = new IPropertyChangeListener() {
 		public void propertyChange(PropertyChangeEvent event) {
@@ -281,6 +285,12 @@
 
 	public Highlighter() {
 		super();
+		
+		// in the 'limitSize' method, we make this strong assumption, so, will check here, 
+		// so if tweaked in future, we'll get a quick reminder. 
+		if (LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE + RIGHT_STYLES_SIZE > MAX_NUMBER_STYLES) {
+			throw new IllegalStateException("Highligher constants are not defined correctly");
+		}
 	}
 
 	protected void addEmptyRange(int start, int length, Collection holdResults) {
@@ -626,13 +636,13 @@
 					ITypedRegion[] partitions = TextUtilities.computePartitioning(getDocument(), fPartitioning, start, length, false);
 					eventStyles = prepareStyleRangesArray(partitions, start, length);
 
-					// If there is a subtext offset, the style ranges must be
-					// adjusted to the expected
-					// offsets
-					// just check if eventLineOffset is different than start
-					// then adjust, otherwise u can leave it alone
-					// unless there is special handling for
-					// itextviewerextension5?
+					/*
+					 * If there is a subtext offset, the style ranges must be
+					 * adjusted to the expected offsets just check if
+					 * eventLineOffset is different than start then adjust,
+					 * otherwise u can leave it alone unless there is special
+					 * handling for itextviewerextension5?
+					 */
 					if (start != eventLineOffset) {
 						int offset = 0;
 						// figure out visible region to use for adjustment
@@ -646,6 +656,8 @@
 						adjust(eventStyles, -offset);
 					}
 
+					eventStyles = limitSize(eventStyles);
+					
 					// for debugging only
 					if (DEBUG) {
 						if (!valid(eventStyles, eventLineOffset, eventLineLength)) {
@@ -670,6 +682,50 @@
 	}
 
 	/**
+	 * This method is to centralize the logic in limiting the overall number of style ranges
+	 * that make it to the styled text widget. 
+	 * 
+	 * Too many styles sent to StyledText results in apparent, but not real, 
+	 * hangs of Eclipse Display thread. See  
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=108806
+	 * 
+	 * @param eventStyles
+	 * @return
+	 */
+	 private StyleRange[] limitSize(StyleRange[] eventStyles) {
+		
+		// quick return with same object if not modification needed
+		if (eventStyles.length < MAX_NUMBER_STYLES) {
+			return eventStyles;
+		}
+		else {
+			// we could just take the easy way out and truncate, but will 
+			// be much better appearing if both the start of the line and the 
+			// end of the line are displayed with styles. Since these are both
+			// the parts of the line a user is likely to look at. The middle of the 
+			// line will still be "plain". Presumably, the user would re-format the 
+			// file to avoid long lines, so unlikely to see the middle. 
+			StyleRange[] newRanges = new StyleRange[LEFT_STYLES_SIZE + RIGHT_STYLES_SIZE + MIDDLE_STYLES_SIZE]; 
+			System.arraycopy(eventStyles, 0, newRanges, 0, LEFT_STYLES_SIZE);
+			//
+			// do end, before we do middle
+			System.arraycopy(eventStyles, eventStyles.length-RIGHT_STYLES_SIZE, newRanges, LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE, RIGHT_STYLES_SIZE);
+			//
+			// technically, we should compute the exact middle as one big style range, 
+			// with default colors and styles, so if someone does actually type or work with 
+			// documnet as is, will still be correct. 
+			//
+			StyleRange allBlank = new StyleRange();
+			StyleRange lastKnown = newRanges[LEFT_STYLES_SIZE - 1];
+			allBlank.start = lastKnown.start + lastKnown.length;
+			StyleRange nextKnown = newRanges[LEFT_STYLES_SIZE + MIDDLE_STYLES_SIZE + 1];
+			allBlank.length = nextKnown.start - allBlank.start;
+			newRanges[LEFT_STYLES_SIZE] = allBlank;
+			return newRanges;
+		}
+	}
+
+	/**
 	 * A passthrough method that extracts relevant data from the
 	 * LineStyleEvent and passes it along. This method was separated for
 	 * performance testing purposes.
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
index 1cd221a..9e80850 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
@@ -305,7 +305,7 @@
 				dr = createDirtyRegion(event.getOffset(), 0, DirtyRegion.INSERT);
 			}
 			else {
-				if(event.getText().equals("")) { //$NON-NLS-1$
+				if("".equals(event.getText())) { //$NON-NLS-1$
 					// it's a delete
 					dr =createDirtyRegion(event.getOffset(), event.getLength(), DirtyRegion.REMOVE);
 				}
diff --git a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
index 1b0afb7..e4488b8 100644
--- a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.xml.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.wst.xml.core.internal.XMLCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -26,6 +26,7 @@
  org.eclipse.wst.xml.core.internal.contentmodel.util,
  org.eclipse.wst.xml.core.internal.contenttype,
  org.eclipse.wst.xml.core.internal.document,
+ org.eclipse.wst.xml.core.internal.emf2xml,
  org.eclipse.wst.xml.core.internal.encoding,
  org.eclipse.wst.xml.core.internal.modelhandler,
  org.eclipse.wst.xml.core.internal.modelquery,
@@ -48,11 +49,11 @@
  org.eclipse.wst.xml.core.internal.validation,
  org.eclipse.wst.xml.core.internal.validation.core,
  org.eclipse.wst.xml.core.internal.validation.core.logging,
+ org.eclipse.wst.xml.core.internal.validation.eclipse,
+ org.eclipse.wst.xml.core.internal.validation.errorcustomization,
  org.w3c.dom,
  org.w3c.dom.ranges,
- org.w3c.dom.traversal,
- org.eclipse.wst.xml.core.internal.emf2xml
- 
+ org.w3c.dom.traversal
 Require-Bundle: org.apache.xerces;visibility:=reexport,
  org.eclipse.wst.sse.core,
  org.eclipse.core.resources,
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.properties b/bundles/org.eclipse.wst.xml.core/plugin.properties
index e1cdf41..837cda4 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.properties
+++ b/bundles/org.eclipse.wst.xml.core/plugin.properties
@@ -22,4 +22,5 @@
 XML_Catalog_Contributions_Extension_Point.name=XML Catalog Contributions Extension Point
 XML_Catalog_Contributor_Extension_Point.name=XML Catalog Contributor Extension Point
 XSL_Content_Type_Extension_Element.name=XSL
-XMI_Content_Type=XMI
\ No newline at end of file
+XMI_Content_Type=XMI
+XML_Validation_Error_Customizer.name=XML Validator Error Customizer Extension Point
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.xml b/bundles/org.eclipse.wst.xml.core/plugin.xml
index d721dbe..4a8f4c4 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.xml
+++ b/bundles/org.eclipse.wst.xml.core/plugin.xml
@@ -2,6 +2,10 @@
 <?eclipse version="3.0"?>
 <plugin>
 
+   <!-- An extension for contributing a XML validation error customizer. -->
+   <extension-point id="errorCustomizer" name="%XML_Validation_Error_Customizer.name" schema="schema/errorCustomizer.exsd"/>
+
+
 	<extension point="org.eclipse.wst.sse.core.modelHandler">
 		<modelHandler
 			default="true"
diff --git a/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd b/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd
new file mode 100644
index 0000000..608f190
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.xml.core">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.xml.core" id="errorCustomizer" name="XML Validation Error Customizer"/>
+      </appInfo>
+      <documentation>
+         The error customizer extension point allows a client to contribute an error customizer for a specific namespace. The error customizer can provide error messages that are more domain specific than the generic error messages provided by the underlying generic XML validator.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="errorCustomizer" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="errorCustomizer">
+      <complexType>
+         <attribute name="namespace" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The namespace for which this error customizer will consider error customizations.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The class that implements &lt;code&gt;org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer&lt;/code&gt;.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of an Error Customizer contribution:
+&lt;pre&gt;
+   &lt;extension
+         id=&quot;sampleErrorCustomizer&quot;
+         name=&quot;Sample Error Customizer&quot;
+         point=&quot;org.eclipse.wst.xml.core.errorCustomizer&quot;&gt;
+      &lt;errorCustomizer
+            namespace=&quot;http://sample.namespace&quot;
+            class=&quot;org.eclipse.wst.xml.core.SampleErrorCustomizer&quot;/&gt;
+   &lt;/extension&gt;
+&lt;/pre&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The supplied class must implement &lt;code&gt;org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer&lt;/code&gt;.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2006 IBM Corporation and others.&lt;br&gt;
+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 &lt;a
+href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java b/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
index d7e6d05..e17cd65 100644
--- a/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
+++ b/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
@@ -47,6 +47,7 @@
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
 import org.w3c.dom.Node;
 
+
 public class EMF2DOMSSERenderer extends EMF2DOMRenderer implements IModelStateListener, IModelLifecycleListener {
 
 	/** The XML DOM model */
@@ -121,12 +122,14 @@
 				try {
 					xmlModelReverted = true;
 					resource.unload();
-				} finally {
+				}
+				finally {
 					if (getXMLModel() != null)
 						getXMLModel().releaseFromEdit();
 				}
 			}
-		} finally {
+		}
+		finally {
 			aboutToChangeNode = null;
 		}
 	}
@@ -148,7 +151,7 @@
 	}
 
 	public void modelDirtyStateChanged(IStructuredModel model, boolean isDirty) {
-		if (!isDirty && resource.isModified()) { //The XMLModel was saved
+		if (!isDirty && resource.isModified()) { // The XMLModel was saved
 			resource.setModified(false);
 			long stamp = WorkbenchResourceHelper.computeModificationStamp(resource);
 			WorkbenchResourceHelper.setSynhronizationStamp(resource, stamp);
@@ -156,21 +159,21 @@
 			IFile aFile = WorkbenchResourceHelper.getFile(resource);
 			synchronizer.preSave(aFile);
 		}
-		if (isDirty) 
+		if (isDirty)
 			resource.setModified(true);
 	}
 
 	public void modelResourceDeleted(IStructuredModel model) {
-		//Do nothing
+		// Do nothing
 	}
 
 	public void modelResourceMoved(IStructuredModel oldModel, IStructuredModel newModel) {
-		//Do nothing
+		// Do nothing
 	}
 
 	/**
-	 * This method is called just prior to being removed from the ResourceSet. Ensure that all
-	 * reference counts to the XMLModel are removed.
+	 * This method is called just prior to being removed from the ResourceSet.
+	 * Ensure that all reference counts to the XMLModel are removed.
 	 */
 	public void preDelete() {
 		if (resource.isLoaded())
@@ -191,10 +194,11 @@
 		// Calling getModelManager() can result in a class cast exception that
 		// should
 		// be ignored.
-		//ModelManager mgr = null;
+		// ModelManager mgr = null;
 		try {
 			getModelManager();
-		} catch (ClassCastException exc) {
+		}
+		catch (ClassCastException exc) {
 			return;
 		}
 		if (xmlModel != null) {
@@ -214,7 +218,8 @@
 	}
 
 	/**
-	 * Insert the method's description here. Creation date: (9/7/2001 10:49:53 AM)
+	 * Insert the method's description here. Creation date: (9/7/2001 10:49:53
+	 * AM)
 	 */
 	public void registerAsModelStateListener() {
 		this.xmlModel.addModelStateListener(this);
@@ -242,7 +247,8 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream, java.util.Map)
+	 * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream,
+	 *      java.util.Map)
 	 */
 	public void doSave(OutputStream outputStream, Map options) throws IOException {
 
@@ -256,12 +262,14 @@
 			try {
 				synchronizer.preSave(aFile);
 				xmlModel.save(aFile);
-			} catch (CoreException ex) {
+			}
+			catch (CoreException ex) {
 				synchronizer.removeFromRecentlySavedList(aFile);
 				Logger.getLogger().logError(ex);
 			}
 			cacheSynchronizationStamp();
-		} finally {
+		}
+		finally {
 			isSaving = false;
 		}
 	}
@@ -287,7 +295,8 @@
 			IFile file = WorkbenchResourceHelper.getFile(getResource());
 			if (file != null) {
 				xmlModelId = getModelManager().calculateId(file);
-			} else {
+			}
+			else {
 				xmlModelId = resource.getURI() + Long.toString(System.currentTimeMillis());
 			}
 		}
@@ -347,15 +356,18 @@
 				}
 				file.create(is, true, null);
 				file.setLocal(true, 1, null);
-			} catch (CoreException e1) {
+			}
+			catch (CoreException e1) {
 				org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e1);
-			} finally {
+			}
+			finally {
 				if (null != is) {
 					is.close();
 				}
 			}
 			initializeXMLModel(file, true);
-		} catch (java.io.IOException ex) {
+		}
+		catch (java.io.IOException ex) {
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(UIResourceHandler.getString("Unexpected_IO_exception_occurred_creating_xml_document_1_EXC_"));//$NON-NLS-1$
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
 		}
@@ -378,7 +390,8 @@
 			}
 			setXMLModelId(getXMLModel().getId());
 			needsToCreateDOM = false;
-		} catch (CoreException e) {
+		}
+		catch (CoreException e) {
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e);
 			return null;
 		}
@@ -419,18 +432,74 @@
 		}
 	}
 
+
+	/**
+	 * @deprecated use batchModeStart and BatchModeEnd instead
+	 * even if you do not use batchModelStart/End, you still need to 
+	 * use the try/finally pattern documented there. 
+	 */
+
 	public void setBatchMode(boolean isBatch) {
+		
+		// This is some extra processing for clients to know they may be using incorrectly
 		if (isBatch) {
-			isBatchChanges = true;
-			getXMLModel().aboutToChangeModel();
-			setRootNodeAdapterNotificationEnabled(false);
+			if (isBatchChanges) {
+				org.eclipse.wst.xml.core.internal.Logger.log(org.eclipse.wst.xml.core.internal.Logger.INFO, "setBatch was set to true when it was already true. This can be an inidcation of invalid calling order");
+			}
+		}
+
+
+		if (isBatch) {
+			batchModeStart();
 		}
 		else {
-			getXMLModel().changedModel();
-			setRootNodeAdapterNotificationEnabled(true);
-			isBatchChanges = false;
+			batchModeEnd();
 		}
 	}
+
+	/**
+	 * batchModeStart and batchModeEnd is a pair that controls notifications, and tread access. 
+	 * They should always be called in a try/finally block.
+	 * 
+	 * setBatchModel begins the processing where notifications are not sent
+	 * out on each change, but saved up until the endBatchMode called.
+	 * 
+	 * This pair of calls can also, indirectly, "lock" the DOM Model to access
+	 * from only one thread, so it should not be locked for long periods of
+	 * time. That's also why it is important to have the endBatchMode in a
+	 * finally block to be sure it is always called, or the DOM will be left
+	 * in a locked, unusable, state and only shortly away from severere program error.
+	 * 
+	 * <pre><code>Example</code>
+	 * 
+	 * try { 
+	 * 		batchModelStart();
+	 * 		...do a some work ...
+	 * 		}
+	 * 	finally {
+	 * 		endBatchMode();
+	 * 		}
+	 * 
+	 * 
+	 * </pre>
+	 */
+	public void batchModeStart() {
+		isBatchChanges = true;
+		getXMLModel().aboutToChangeModel();
+		setRootNodeAdapterNotificationEnabled(false);
+	}
+
+	/**
+	 * see batchModelEnd
+	 * 
+	 */
+
+	public void batchModeEnd() {
+		getXMLModel().changedModel();
+		setRootNodeAdapterNotificationEnabled(true);
+		isBatchChanges = false;
+	}
+
 	public boolean isBatchMode() {
 		return isBatchChanges;
 	}
@@ -439,8 +508,11 @@
 		EObject root = resource.getRootObject();
 		if (root != null) {
 			EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(root, EMF2DOMAdapter.ADAPTER_CLASS);
-			if (adapter != null)
+			if (adapter != null) {
 				adapter.setNotificationEnabled(b);
+				if (b)
+					adapter.updateDOM();
+			}
 		}
 	}
 
@@ -499,11 +571,11 @@
 
 	public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	public void modelReinitialized(IStructuredModel structuredModel) {
 		// TODO Auto-generated method stub
-		
+
 	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
index a8bc261..103f874 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
@@ -19,11 +19,11 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.net.ConnectException;
+import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Hashtable;
 import java.util.List;
-
 import org.apache.xerces.impl.XMLErrorReporter;
 import org.apache.xerces.parsers.StandardParserConfiguration;
 import org.apache.xerces.xni.NamespaceContext;
@@ -36,11 +36,14 @@
 import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
 import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream;
 import org.eclipse.wst.xml.core.internal.validation.core.logging.LoggerFactory;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorCustomizationManager;
+import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.ext.DeclHandler;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * This class performs validation using a xerces sax parser.  
@@ -52,6 +55,7 @@
 {
   protected URIResolver uriResolver = null;
   //protected MyEntityResolver entityResolver = null;
+  protected ErrorCustomizationManager errorCustomizationManager;
   protected Hashtable ingoredErrorKeyTable = new Hashtable();
 
   protected static final String IGNORE_ALWAYS = "IGNORE_ALWAYS"; //$NON-NLS-1$
@@ -115,6 +119,25 @@
       reader.setFeature("http://xml.org/sax/features/namespaces", valinfo.isNamespaceEncountered());               //$NON-NLS-1$
       reader.setFeature("http://xml.org/sax/features/validation", valinfo.isGrammarEncountered());  //$NON-NLS-1$
       reader.setFeature("http://apache.org/xml/features/validation/schema", valinfo.isGrammarEncountered()); //$NON-NLS-1$
+      reader.setContentHandler(new DefaultHandler()
+      {
+        public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+          
+          if (errorCustomizationManager == null)
+          {
+            errorCustomizationManager = new ErrorCustomizationManager();
+//            if (errorCustomizationManager.isDocumentNamespaceApplicable(uri))
+//            {
+//              errorCustomizationManager.setActive(true);
+//            }  
+          }
+          errorCustomizationManager.startElement(uri, localName);                    
+        }
+        
+        public void endElement(String uri, String localName, String qName) throws SAXException {
+          errorCustomizationManager.endElement(uri, localName);
+        }
+      });      
       
       // MH make sure validation works even when a customer entityResolver is note set (i.e. via setURIResolver())
       if (entityResolver != null)
@@ -342,6 +365,23 @@
       {                     
         String physical = uriResolver.resolvePhysicalLocation(rid.getBaseSystemId(), id, location);
         is = new XMLInputSource(rid.getPublicId(), location, location);
+        
+        // This block checks that the file exists. If it doesn't we need to throw
+        // an exception so Xerces will report an error. note: This may not be
+        // necessary with all versions of Xerces but has specifically been 
+        // experienced with the version included in IBM's 1.4.2 JDK.
+        InputStream isTemp = null;
+        try
+        {
+          isTemp = new URL(physical).openStream();
+        }
+        finally
+        {
+          if(isTemp != null)
+          {
+            isTemp.close();
+          }
+        }
         is.setByteStream(new LazyURLInputStream(physical));      
       }
     }
@@ -526,6 +566,7 @@
 		      if (reportError)
 		      {
 		        super.reportError(domain, key, arguments, severity);
+		        errorCustomizationManager.considerReportedError(valinfo, key, arguments);
 		      }
 		    }
 		};
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
index 807ea9a..d364d24 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
@@ -191,5 +191,11 @@
   {
 	  return this.messageArguments;
   }
+  
+
+  public void setMessage(String message)
+  {
+    this.message = message;
+  }  
                                      
 }
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java
new file mode 100644
index 0000000..ab6c170
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.eclipse;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorCustomizationRegistry;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorMessageCustomizerDelegate;
+import org.osgi.framework.Bundle;
+/**
+ * This class reads the plug-in manifests and registers each extension
+ * error customizer with the ErrorCustomizationRegistry.
+ */
+public class ErrorCustomizationPluginRegistryReader {
+	
+	  protected static final String PLUGIN_ID = "org.eclipse.wst.xml.core";
+	  protected static final String ATT_CLASS = "class";
+	  protected static final String ATT_NAMESPACE = "namespace";
+	  protected static final String EXTENSION_POINT_ID = "errorCustomizer";
+	  protected static final String tagName = EXTENSION_POINT_ID;
+
+	  /**
+	   * Read from plugin registry for the errorcustomizer extension.
+	   */
+	  public void readRegistry()
+	  {
+	    IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();
+	    IExtensionPoint point = pluginRegistry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
+	    if (point != null)
+	    {
+	      IConfigurationElement[] elements = point.getConfigurationElements();
+	      for (int i = 0; i < elements.length; i++)
+	      {
+	        readElement(elements[i]);
+	      }
+	    }
+	  }
+
+	  /**
+	   * readElement() - parse and deal with an extension like:
+	   *
+	   * <extension point="org.eclipse.wst.xml.core.errorCustomizer"
+	   *            id="specificErrorCustomizer"
+	   *            name="Specific Error Customizer">
+	   *   <errorCustomizer
+	   *   			namespace="http://specificnamespace"
+	   *   			class="org.eclipse.wst.xml.core.MySpecificErrorCustomizer/>
+	   * </extension>
+	   */
+	  protected void readElement(IConfigurationElement element)
+	  {
+	    if (element.getName().equals(tagName))
+	    {
+	      String errorCustomizerClass = element.getAttribute(ATT_CLASS);
+	      String namespace = element.getAttribute(ATT_NAMESPACE);
+
+	      if (errorCustomizerClass != null)
+	      {
+	        try
+	        {
+	          Bundle pluginBundle = Platform.getBundle(element.getDeclaringExtension().getNamespace());
+	          ErrorMessageCustomizerDelegate delegate = new ErrorMessageCustomizerDelegate(pluginBundle, errorCustomizerClass);
+	          ErrorCustomizationRegistry.getInstance().addErrorMessageCustomizer(namespace, delegate);
+	        }
+	        catch (Exception e)
+	        {
+	        }
+	      }
+	    }
+	  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
new file mode 100644
index 0000000..eb1cca2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.errorcustomization;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A simple class to store information about an XML element.
+ */
+public class ElementInformation
+{
+  protected String localName;
+  protected String namespace;
+  protected List children = new ArrayList();
+
+  /**
+   * Constructor.
+   * 
+   * @param uri
+   * 		The namespace URI of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public ElementInformation(String uri, String localName)
+  {
+    this.localName = localName;
+    this.namespace = uri;
+  }
+  
+  /**
+   * Get the namespace of this element.
+   * 
+   * @return
+   * 		The namespace of this element.
+   */
+  public String getNamespace()
+  {
+	return namespace;
+  }
+  
+  /**
+   * Get the local name of this element.
+   * 
+   * @return
+   * 		The local name of this element.
+   */
+  public String getLocalname()
+  {
+	return localName;
+  }
+  
+  /**
+   * Get the list of children of this element. The list contains
+   * ElementInformation objects representing the children of this element.
+   * 
+   * @return
+   * 		The list of children of this element.
+   */
+  public List getChildren()
+  {
+	return children;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
new file mode 100644
index 0000000..745acc0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.errorcustomization;
+
+import java.util.Stack;
+
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
+
+/**
+ * This class tracks the context of the parsed document to help identify error
+ * conditions
+ */
+public class ErrorCustomizationManager
+{
+  protected Stack elementInformationStack = new Stack();
+  protected ErrorMessageInformation messageForConsideration;
+
+  /**
+   * This method should be called in the start element method of the XML validator's
+   * content handler.
+   * 
+   * @param uri
+   * 		The namespace of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public void startElement(String uri, String localName)
+  { 
+    ElementInformation elementInformation = new ElementInformation(uri, localName);
+    if (elementInformationStack.size() > 0)
+    {
+      ElementInformation parent = (ElementInformation) elementInformationStack.peek();
+      parent.children.add(elementInformation);
+    }
+    elementInformationStack.push(elementInformation);
+  }
+
+  /**
+   * This method should be called in the end element method of the XML validator's
+   * content handler.
+   * 
+   * @param uri
+   * 		The namespace of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public void endElement(String uri, String localName)
+  {   
+    if (elementInformationStack.size() > 0)
+    {
+      ElementInformation elementInformation = (ElementInformation)elementInformationStack.pop();
+      if (messageForConsideration != null)
+      {  
+        IErrorMessageCustomizer[] customizers = ErrorCustomizationRegistry.getInstance().getCustomizers(elementInformation.getNamespace());
+        int numCustomizers = customizers.length;
+        for(int i = 0; i < numCustomizers; i++)
+        {
+          String message = customizers[i].customizeMessage(elementInformation, messageForConsideration.key, messageForConsideration.arguments);
+          if(message != null)
+          {
+        	messageForConsideration.message.setMessage(message);
+        	break;
+          }
+        }
+      }  
+    }
+  }
+
+  /**
+   * Consider the reported error for customization.
+   * 
+   * @param valInfo
+   * 		The current ValidationInfo object containing validation specific information.
+   * @param key
+   * 		The key related to the message.
+   * @param arguments
+   * 		Any message arguments.
+   */
+  public void considerReportedError(ValidationInfo valInfo, String key, Object[] arguments)
+  {
+    messageForConsideration = null;
+    ValidationMessage[] messages = valInfo.getValidationMessages();
+    if (messages.length > 0)
+    {  
+      messageForConsideration = new ErrorMessageInformation();
+      messageForConsideration.key = key;
+      messageForConsideration.arguments = arguments;
+      messageForConsideration.message = messages[messages.length - 1]; 
+    }
+  }
+  
+  /**
+   * A simple class to hold error message information.
+   */
+  public class ErrorMessageInformation
+  {
+	public String key = null;
+	public Object[] arguments = null;
+	public ValidationMessage message = null;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java
new file mode 100644
index 0000000..db0d0ce
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.errorcustomization;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The error customization regsitry manages all registered
+ * IErrorMessageCustomizers by namespace.
+ */
+public class ErrorCustomizationRegistry 
+{
+  protected static ErrorCustomizationRegistry registry = null;
+  protected Map customizers = new HashMap();
+  
+  /**
+   * Restricted constructor in keeping with the singleton pattern.
+   */
+  protected ErrorCustomizationRegistry()
+  {
+  }
+  
+  /**
+   * Get the one and only instance of the registry.
+   * 
+   * @return
+   * 		The one and only instance of the registry.
+   */
+  public static ErrorCustomizationRegistry getInstance()
+  {
+	if(registry == null)
+	{
+	  registry = new ErrorCustomizationRegistry();
+	}
+	return registry;
+  }
+  
+  /**
+   * Add a customizer to the registry. 
+   * 
+   * @param namespace
+   * 		The namespace the customizer will act on.
+   * @param customizer
+   * 		The error customizer to register.
+   */
+  public void addErrorMessageCustomizer(String namespace, IErrorMessageCustomizer customizer)
+  {
+	// To register a customizer for the no namespace use an empty string.
+	if(namespace == null)
+	{
+	  namespace = "";
+	}
+	List customizersForNS = (List)customizers.get(namespace);
+	if(customizersForNS == null)
+	{
+	  customizersForNS = new ArrayList();
+	  customizers.put(namespace, customizersForNS);
+	}
+	if(customizer != null)
+	{
+	  customizersForNS.add(customizer);
+	}
+  }
+  
+  /**
+   * Get the error customizers for a given namespace.
+   * 
+   * @param namespace
+   * 		The namespace for which to retrieve the customizers.
+   * @return
+   * 		An array of customizers registered for this namespace.
+   */
+  public IErrorMessageCustomizer[] getCustomizers(String namespace)
+  {
+	if(namespace == null)
+	{
+	  namespace = "";
+	}
+	List customizersForNS = (List)customizers.get(namespace);
+	if(customizersForNS == null)
+	{
+	  customizersForNS = new ArrayList();
+	}
+	return (IErrorMessageCustomizer[])customizersForNS.toArray(new IErrorMessageCustomizer[customizersForNS.size()]);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java
new file mode 100644
index 0000000..444d86d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.errorcustomization;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.osgi.framework.Bundle;
+
+/**
+ * An error message customizer delegate is used to allow for
+ * lazy loading of error customizers.
+ *
+ */
+public class ErrorMessageCustomizerDelegate implements IErrorMessageCustomizer
+{
+  protected Bundle bundle = null;
+  protected String classname = null;
+  protected IErrorMessageCustomizer customizer = null;
+  
+  public ErrorMessageCustomizerDelegate(Bundle bundle, String classname)
+  {
+	this.bundle = bundle;
+	this.classname = classname;
+  }
+
+  /* (non-Javadoc)
+   * @see org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer#customizeMessage(org.eclipse.wst.xml.core.internal.validation.errorcustomization.ElementInformation, java.lang.String, java.lang.Object[])
+   */
+  public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments) 
+  {
+	if(customizer == null)
+	{
+	  loadCustomizer();
+	}
+	if(customizer == null)
+	{
+	  return null;
+	}
+	return customizer.customizeMessage(elementInfo, errorKey, arguments);
+  }
+  
+  /**
+   * Load the customizer class.
+   */
+  protected void loadCustomizer()
+  {
+	try
+	{
+	  Class customizerClass = bundle.loadClass(classname);
+	  customizer = (IErrorMessageCustomizer)customizerClass.newInstance();
+	}
+	catch(Exception e)
+	{
+	  XMLCorePlugin.getDefault().getLog().log(
+			  new Status(IStatus.WARNING, 
+					     XMLCorePlugin.getDefault().getBundle().getSymbolicName(), 
+					     IStatus.OK, 
+					     "The XML validator error customizer was unable to load class " + classname, e));
+	}
+  }
+  
+  
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java
new file mode 100644
index 0000000..ac6d1e0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.core.internal.validation.errorcustomization;
+
+/**
+ * An error message customizer will be called by the XML validator to customize
+ * XML validation errors for a given namespace. The customizer can be used to 
+ * create clearer errors for specific application domains.
+ */
+public interface IErrorMessageCustomizer 
+{
+  /**
+   * Return a customized error message for the given element. Null should be returned
+   * if the message should not be customized.
+   * 
+   * @param elementInformation
+   * 		The information about the element for which to customize the error.
+   * @param errorKey
+   * 		The key for the error for which to replace the message.
+   * @param arguments
+   * 		Arguments related the the error message.
+   * @return
+   * 		A customized error message or null if this customizer will not customize the message.
+   */
+  public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments);
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
index 695489e..8c3d7af 100644
--- a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.xml.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.wst.xml.ui.internal.XMLUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
index d6bea0a..3f46783 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
@@ -305,7 +305,7 @@
 	IPropertyListener fPropertyListener = null;
 
 	/** The source page index. */
-	private int fSourcePageIndex;
+	int fSourcePageIndex;
 
 	/** The text editor. */
 	private StructuredTextEditor fTextEditor;
@@ -382,14 +382,26 @@
 		if (fDesignViewer.getSelectionProvider() instanceof IPostSelectionProvider) {
 			((IPostSelectionProvider) fDesignViewer.getSelectionProvider()).addPostSelectionChangedListener(new ISelectionChangedListener() {
 				public void selectionChanged(SelectionChangedEvent event) {
-					getTextEditor().getSelectionProvider().setSelection(event.getSelection());
+					/*
+					 * Only force selection update if source page is not
+					 * active
+					 */
+					if (getActivePage() != fSourcePageIndex) {
+						getTextEditor().getSelectionProvider().setSelection(event.getSelection());
+					}
 				}
 			});
 		}
 		else {
 			fDesignViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
 				public void selectionChanged(SelectionChangedEvent event) {
-					getTextEditor().getSelectionProvider().setSelection(event.getSelection());
+					/*
+					 * Only force selection update if source page is not
+					 * active
+					 */
+					if (getActivePage() != fSourcePageIndex) {
+						getTextEditor().getSelectionProvider().setSelection(event.getSelection());
+					}
 				}
 			});
 		}
@@ -649,7 +661,7 @@
 	private IPreferenceStore getPreferenceStore() {
 		return XMLUIPlugin.getDefault().getPreferenceStore();
 	}
-
+	
 	StructuredTextEditor getTextEditor() {
 		return fTextEditor;
 	}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
index 0f67568..1f3cb21 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
@@ -15,6 +15,7 @@
 
 import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
 import org.eclipse.wst.xml.core.internal.validation.XMLValidationReport;
+import org.eclipse.wst.xml.core.internal.validation.eclipse.ErrorCustomizationPluginRegistryReader;
 
 /**
  * An XML validator specific to Eclipse. This validator will wrap the internal
@@ -50,6 +51,7 @@
   {
     validator = new org.eclipse.wst.xml.core.internal.validation.XMLValidator();
     validator.setURIResolver(URIResolverPlugin.createResolver());
+    new ErrorCustomizationPluginRegistryReader().readRegistry();
   }
   /**
    * Validate the file at the given URI.
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..9eb98c4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xml.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
index 01068ba..32b40df 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
@@ -65,9 +65,20 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
-
+		
 		// if already adding template proposals for a certain context type, do
 		// not add again
 		if (!fTemplateContexts.contains(context)) {
@@ -76,7 +87,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -89,7 +100,8 @@
 	
 	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
 		ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-		addTemplates(request, TemplateContextTypeIdsXML.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsXML.ALL, documentPosition);
 		return request;
 	}
 	
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
index a789a47..619bcae 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
@@ -12,14 +12,24 @@
  *******************************************************************************/
 package org.eclipse.wst.xml.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
@@ -35,8 +45,88 @@
  * templates.
  */
 class XMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+	
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
similarity index 62%
rename from development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs
rename to bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
index c1373fb..6cdb4d2 100644
--- a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,50 +1,50 @@
-#Mon May 30 19:10:44 EDT 2005
+#Mon Jan 30 18:54:33 EST 2006
 eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -54,5 +54,4 @@
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
index 6e4ed9f..390939c 100644
--- a/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %_UI_PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.wst.xsd.core; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.xsd.core.internal.XSDCorePlugin
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java b/bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java
index a346aa0..f16d9c0 100644
--- a/bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java
+++ b/bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * Copyright (c) 2001, 2006 IBM Corporation and others.
  * 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
@@ -10,159 +10,102 @@
  *******************************************************************************/
 package org.eclipse.wst.xsd.core.internal.validation;
 
-import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.net.URL;
 
-import org.apache.xerces.parsers.SAXParser;
+import org.apache.xerces.impl.Constants;
+import org.apache.xerces.parsers.XMLGrammarPreparser;
+import org.apache.xerces.util.XMLGrammarPoolImpl;
 import org.apache.xerces.xni.XMLResourceIdentifier;
 import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
 import org.apache.xerces.xni.parser.XMLEntityResolver;
+import org.apache.xerces.xni.parser.XMLErrorHandler;
 import org.apache.xerces.xni.parser.XMLInputSource;
+import org.apache.xerces.xni.parser.XMLParseException;
 import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
 import org.eclipse.wst.xml.core.internal.validation.XMLValidator;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
+import org.w3c.dom.DOMError;
 
 /**
  * The XSDValidator will validate XSD files.
- * 
- * @author Lawrence Mandel, IBM
  */
 public class XSDValidator
 {
-
-  private final String XML_INSTANCE_DOC_TOP = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<root \n"   //$NON-NLS-1$//$NON-NLS-2$
-  + "  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"; //$NON-NLS-1$
-
-  private final String XML_INSTANCE_DOC_MID = " xsi:noNamespaceSchemaLocation=\""; //$NON-NLS-1$
-
-  private final String XML_INSTANCE_DOC_BOT = "\">\n" + "</root>\n";  //$NON-NLS-1$//$NON-NLS-2$
-
-  private final String DUMMY_URI = "http://example.org/dummy"; //$NON-NLS-1$
-  
   private URIResolver uriresolver = null;
 
   public ValidationReport validate(String uri)
   {
     return validate(uri, null);
   }
-
+  
   /**
    * Validate the XSD file specified by the URI.
    * 
    * @param uri
    *          The URI of the XSD file to validate.
+   * @param inputStream An input stream representing the XSD file to validate.
    */
   public ValidationReport validate(String uri, InputStream inputStream)
   {
-    ValidationInfo valinfo = new ValidationInfo(uri);
-    try
-    {
-      String ns = null;
-      String schemaLocationString = "";
+	ValidationInfo valinfo = new ValidationInfo(uri);
+	XSDErrorHandler errorHandler = new XSDErrorHandler(valinfo);
+	try
+	{
+	  XMLGrammarPreparser grammarPreparser = new XMLGrammarPreparser();
+	  grammarPreparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA,null/*schemaLoader*/);
+		  
+	  grammarPreparser.setProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY, new XMLGrammarPoolImpl());
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE, false);
+      grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE, true);
+      grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE, true);
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATION_FEATURE, true);
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE, true);
+      grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING, false);
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE, true);
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE, true);
+	  grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ATTDEF_FEATURE, true);
+	      
+	  try
+	  {
+	    grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + "http://apache.org/xml/features/honour-all-schemaLocations", true);
+	  }
+      catch (Exception e)
+	  {
+	    // catch the exception and ignore
+	  }
+	      
+	  grammarPreparser.setErrorHandler(errorHandler);
+	  if (uriresolver != null)
+	  {
+	    XSDEntityResolver resolver = new XSDEntityResolver(uriresolver, uri);
+	    if (resolver != null)
+	    {
+	      grammarPreparser.setEntityResolver(resolver);
+	    }
+	  }
 
-      URL url = new URL(uri);
-      if (url != null)
-      {
-        BufferedReader bufreader = new BufferedReader(new InputStreamReader(url.openStream()));
-
-        if (bufreader != null)
-        {
-          StringBuffer source = new StringBuffer();
-          while (bufreader.ready())
-          {
-            source.append(bufreader.readLine());
-          }
-          bufreader.close();
-          int tn = source.indexOf("targetNamespace");
-          if (tn != -1)
-          {
-            int firstquote = source.indexOf("\"", tn) + 1;
-            int secondquote = source.indexOf("\"", firstquote);
-            ns = source.substring(firstquote, secondquote);
-          }
-        }
-        bufreader.close();
+	  try
+	  {
+	  	XMLInputSource is = new XMLInputSource(null, uri, uri, inputStream, null);
+	    grammarPreparser.getLoader(XMLGrammarDescription.XML_SCHEMA);
+		grammarPreparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,is);
+	  }
+	  catch (Exception e)
+	  {
+	    //parser will return null pointer exception if the document is structurally invalid
+		//TODO: log error message
+		//System.out.println(e);
       }
-
-      XSDErrorHandler errorHandler = new XSDErrorHandler(valinfo);
-      try
-      {
-        StringBuffer instanceDoc = new StringBuffer(XML_INSTANCE_DOC_TOP);
-        if (ns != null && !ns.equals(""))
-        {
-          instanceDoc.append(" xmlns=\"").append(ns).append("\"\n");
-          instanceDoc.append(" xsi:schemaLocation=\"");
-          instanceDoc.append(ns);
-          instanceDoc.append(" ");
-        } else
-        {
-          instanceDoc.append(XML_INSTANCE_DOC_MID);
-        }
-        instanceDoc.append(uri.replaceAll(" ", "%20"));
-        if (!schemaLocationString.equals(""))
-        {
-          instanceDoc.append(" ").append(schemaLocationString);
-        }
-        instanceDoc.append(XML_INSTANCE_DOC_BOT);
-        InputSource is = new InputSource(new StringReader(instanceDoc.toString()));
-        is.setSystemId(DUMMY_URI);
-
-        String soapFile = "platform:/plugin/org.eclipse.wst.wsdl.validation./xsd/xml-soap.xsd";
-        XMLReader reader = new SAXParser();
-        try
-        {
-          reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false);
-          reader.setFeature("http://xml.org/sax/features/namespaces", true);
-          reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
-          reader.setFeature("http://xml.org/sax/features/validation", true);
-          reader.setFeature("http://apache.org/xml/features/validation/schema", true);
-          reader.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
-          reader.setFeature("http://xml.org/sax/features/external-general-entities", true);
-          reader.setFeature("http://xml.org/sax/features/external-parameter-entities", true);
-          reader.setFeature("http://apache.org/xml/features/validation/warn-on-duplicate-attdef", true);
-
-          reader.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", 
-          		"http://xml.apache.org/xml-soap " + soapFile);
-          reader.setErrorHandler(errorHandler);
-
-          if (uriresolver != null)
-          {
-            XSDEntityResolver resolver = new XSDEntityResolver(uriresolver, uri, inputStream);
-            try
-            {
-              reader.setProperty("http://apache.org/xml/properties/internal/entity-resolver", resolver);
-            }
-            catch (Exception e)
-            {
-              // TODO: log failure to register the entity resolver.
-            }
-          }
-
-          reader.parse(is);
-
-        } catch (SAXException e)
-        {
-          //LoggerFactory.getLoggerInstance().logError("XSD Validator Exception: ", e);
-        }
-      } catch (IOException except)
-      {
-        //LoggerFactory.getLoggerInstance().logError("XSD Validator Exception: ", except);
-      }
-    } catch (Exception e)
-    { 
-      //LoggerFactory.getLoggerInstance().logError("XSD Validator Exception: ", e);
-    }
-
-    return valinfo;
+	}
+	catch (Exception e)
+	{
+      // TODO: log error.
+	  //System.out.println(e);
+	}
+	return valinfo;
   }
 
   /**
@@ -179,16 +122,10 @@
   /**
    * The XSDErrorHandler handle Xerces parsing errors and puts the errors
    * into the given ValidationInfo object.
-   * 
-   * @author Lawrence Mandel, IBM
    */
-  protected class XSDErrorHandler implements org.xml.sax.ErrorHandler
+  protected class XSDErrorHandler implements XMLErrorHandler
   {
-
-    private final int ERROR = 0;
-
-    private final int WARNING = 1;
-
+	  
     private final ValidationInfo valinfo;
 
     public XSDErrorHandler(ValidationInfo valinfo)
@@ -199,57 +136,49 @@
     /**
      * Add a validation message with the given severity.
      * 
+     * @param errorKey The Xerces error key.
      * @param exception The exception that contains the information about the message.
      * @param severity The severity of the validation message.
      */
-    protected void addValidationMessage(SAXParseException exception, int severity)
+    protected void addValidationMessage(String errorKey, XMLParseException exception, int severity)
     { 
-      // get the error key by taking the substring of what is before the ':' in the error message:
-      String errorKey = exception.getLocalizedMessage();
-      if (errorKey != null)
+      String systemId = exception.getExpandedSystemId();
+      if (systemId != null)
       {
-        int index = errorKey.indexOf(':');
-        if (index != -1)
-        { errorKey = errorKey.substring(0, index);
-        }
-      }
-      
-      if (exception.getSystemId() != null && !exception.getSystemId().equals(DUMMY_URI))
-      {
-        if (severity == WARNING)
+        if (severity == DOMError.SEVERITY_WARNING)
         {
-          valinfo.addWarning(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId());
+          valinfo.addWarning(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), systemId);
         }
         else
         {
-          valinfo.addError(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId(), errorKey, null);
+          valinfo.addError(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), systemId, errorKey, null);
         }
       }
     }
 
     /* (non-Javadoc)
-     * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
+     * @see org.apache.xerces.xni.parser.XMLErrorHandler#warning(java.lang.String, java.lang.String, org.apache.xerces.xni.parser.XMLParseException)
      */
-    public void error(SAXParseException exception) throws SAXException
-    {
-      addValidationMessage(exception, ERROR);
-    }
+    public void warning(String domain, String key, XMLParseException exception) throws XNIException
+	{
+    	addValidationMessage(key, exception, DOMError.SEVERITY_WARNING);
+	}
 
     /* (non-Javadoc)
-     * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
+     * @see org.apache.xerces.xni.parser.XMLErrorHandler#error(java.lang.String, java.lang.String, org.apache.xerces.xni.parser.XMLParseException)
      */
-    public void fatalError(SAXParseException exception) throws SAXException
+    public void error(String domain, String key, XMLParseException exception) throws XNIException
     {
-      addValidationMessage(exception, ERROR);
-    }
+    	addValidationMessage(key, exception, DOMError.SEVERITY_ERROR);
+	}
 
     /* (non-Javadoc)
-     * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
+     * @see org.apache.xerces.xni.parser.XMLErrorHandler#fatalError(java.lang.String, java.lang.String, org.apache.xerces.xni.parser.XMLParseException)
      */
-    public void warning(SAXParseException exception) throws SAXException
-    {
-      addValidationMessage(exception, WARNING);
-    }
+    public void fatalError(String domain, String key, XMLParseException exception) throws XNIException
+	{
+    	addValidationMessage(key, exception, DOMError.SEVERITY_FATAL_ERROR);
+	}
   }
 
   /**
@@ -260,8 +189,6 @@
   {
     private URIResolver uriresolver = null;
 
-    private InputStream inputStream;
-
     /**
      * Constructor.
      * 
@@ -269,10 +196,9 @@
      *          The idresolver this entity resolver wraps.
      * @param baselocation The base location to resolve with.
      */
-    public XSDEntityResolver(URIResolver uriresolver, String baselocation, InputStream inputStream)
+    public XSDEntityResolver(URIResolver uriresolver, String baselocation)
     {
       this.uriresolver = uriresolver;
-      this.inputStream = inputStream;
     }
     
     /* (non-Javadoc)
@@ -280,23 +206,17 @@
      */
     public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws XNIException, IOException
     {
-      // consider the resourceIdentifier's fields to see we're actually in the dummy xml file
-      // and if this is the reference to the schema we want to validate
-      // ... if so return an XMLInputSource built from the dirty copy of the schema
-      boolean isDummyXML = DUMMY_URI.equals(resourceIdentifier.getBaseSystemId());
-      if (isDummyXML && inputStream != null)
+      String literalSystemId = resourceIdentifier.getLiteralSystemId();
+      if(literalSystemId != null)
       {
-        XMLInputSource inputSource = new XMLInputSource(null, resourceIdentifier.getLiteralSystemId(), null, inputStream, null);
-        return inputSource;
+    	resourceIdentifier.setLiteralSystemId(literalSystemId.replace('\\','/'));
       }
-      else
-      {
         // TODO cs: In revision 1.1 we explicitly opened a stream to ensure
         // file I/O problems produced messages. I've remove this fudge for now
         // since I can't seem to reproduce the problem it was intended to fix.
         // I'm hoping the newer Xerces code base has fixed this problem and the fudge is defunct.
         return XMLValidator._internalResolveEntity(uriresolver, resourceIdentifier);
-      }
+      
     }
   }   
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
index cb40d00..91c80fe 100644
--- a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %_UI_PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.wst.xsd.ui; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java
new file mode 100644
index 0000000..92a2027
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java
@@ -0,0 +1,27 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.wst.xml.core.internal.provisional.NameValidator;
+
+public class Checks {
+	
+	public static RefactoringStatus checkName(String name) {
+		RefactoringStatus result= new RefactoringStatus();
+		if ("".equals(name)) //$NON-NLS-1$
+			return RefactoringStatus.createFatalErrorStatus("RefactoringMessages.Checks_Choose_name"); 
+		return result;
+	}
+	
+	public static boolean isAlreadyNamed(RefactoringComponent element, String name){
+		return name.equals(element.getName());
+	}
+	
+	public static RefactoringStatus checkComponentName(String name) {
+		RefactoringStatus result= new RefactoringStatus();
+		if (!NameValidator.isValid(name)) //$NON-NLS-1$
+			return RefactoringStatus.createFatalErrorStatus("RefactoringMessages.Checks_Choose_name"); 
+
+		return result;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java
new file mode 100644
index 0000000..76adc4d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java
@@ -0,0 +1,20 @@
+/*
+ * Created on Feb 16, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+/**
+ * @author ebelisar
+ */
+public interface INameUpdating {
+
+	public abstract void setNewElementName(String newName);
+	public abstract String getNewElementName();
+	public abstract String getCurrentElementName();
+    public abstract RefactoringStatus checkNewElementName(String newName);
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java
new file mode 100644
index 0000000..2b65694
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java
@@ -0,0 +1,24 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+public interface IReferenceUpdating {
+
+	/**
+	 * Checks if this refactoring object is capable of updating references to the renamed element.
+	 */
+	public boolean canEnableUpdateReferences();
+
+	/**
+	 * If <code>canUpdateReferences</code> returns <code>true</code>, then this method is used to
+	 * inform the refactoring object whether references should be updated.
+	 * This call can be ignored if  <code>canUpdateReferences</code> returns <code>false</code>.
+	 */	
+	public void setUpdateReferences(boolean update);
+
+	/**
+	 * If <code>canUpdateReferences</code> returns <code>true</code>, then this method is used to
+	 * ask the refactoring object whether references should be updated.
+	 * This call can be ignored if  <code>canUpdateReferences</code> returns <code>false</code>.
+	 */		
+	public boolean getUpdateReferences();
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java
new file mode 100644
index 0000000..8f4dc58
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java
@@ -0,0 +1,51 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+public interface RefactoringComponent
+{
+	/**
+	 * @return the name of the component that is refactored.  E.g. "foo"
+	 */
+	public String getName();
+	
+	/**
+	 * @return the namespace of the component that is refactored.  E.g. "http://foo"
+	 */
+	public String getNamespaceURI();
+	
+	/**
+	 * The basic DOM element is used by the refactoring processor/participant to get 
+	 * access to the file location.
+	 * 
+	 * @return the Structured Source Editor XML DOM element object that underlines the 
+	 * combonent being refactore.
+	 * 
+	 * @see IDOMElement 
+	 */
+	public IDOMElement getElement();
+	
+	/** 
+	 * @return the qualified name of the type of the refactored component. 
+	 * 
+	 * <p>
+	 * A qualified name consists of a local name and a namespace.  
+	 * E.g. "complexType"-local name, "http://www.w3.org/2001/XMLSchema"-namespace
+	 * </p>
+	 * 
+	 * @see QualifiedName
+	 */
+	public QualifiedName getTypeQName();
+		
+	/** 
+	 * The model object may be required to be given to the refactored participants as is or 
+	 * other objects could be derived from it.
+	 * 
+	 * @return the principal object being refactored, such as an instance of WSDLElement or 
+	 * XSDNamedComponent
+	 */
+	public Object getModelObject();
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringMessages.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringMessages.java
new file mode 100644
index 0000000..7b56d8d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringMessages.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class RefactoringMessages {
+
+	private static final String RESOURCE_BUNDLE= "org.eclipse.wst.xsd.ui.internal.refactor.messages";//$NON-NLS-1$
+
+	private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+	private RefactoringMessages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return fgResourceBundle.getString(key);
+		} catch (MissingResourceException e) {
+			return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+		}
+	}
+	
+	public static String[] getStrings(String keys[]) {
+		String[] result= new String[keys.length];
+		for (int i= 0; i < keys.length; i++) {
+			result[i]= getString(keys[i]);
+		}
+		return result;
+	}
+	
+	public static String getFormattedString(String key, Object arg) {
+		return getFormattedString(key, new Object[] { arg });
+	}
+	
+	public static String getFormattedString(String key, Object[] args) {
+		return MessageFormat.format(getString(key), args);	
+	}	
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java
new file mode 100644
index 0000000..4a3fc53
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java
@@ -0,0 +1,14 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+
+import org.eclipse.ui.IStartup;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+
+public class Startup implements IStartup {
+
+	public void earlyStartup() {
+		XSDEditorPlugin.getPlugin();
+
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java
new file mode 100644
index 0000000..69ff744
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java
@@ -0,0 +1,101 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+
+/**
+ * A <code>TextChangeManager</code> manages associations between <code>IFile</code> and <code>TextChange</code> objects.
+ */
+public class TextChangeManager {
+	
+	private Map fMap= new HashMap(10); // IFile -> TextChange
+	
+	private final boolean fKeepExecutedTextEdits;
+	
+	public TextChangeManager() {
+		this(false);
+	}
+
+	public TextChangeManager(boolean keepExecutedTextEdits) {
+		fKeepExecutedTextEdits= keepExecutedTextEdits;
+	}
+	
+	/**
+	 * Adds an association between the given file and the passed
+	 * change to this manager.
+	 * 
+	 * @param file the file (key)
+	 * @param change the change associated with the file
+	 */
+	public void manage(IFile file, TextChange change) {
+		fMap.put(file, change);
+	}
+	
+	/**
+	 * Returns the <code>TextChange</code> associated with the given file.
+	 * If the manager does not already manage an association it creates a one.
+	 * 
+	 * @param file the file for which the text buffer change is requested
+	 * @return the text change associated with the given file. 
+	 */
+	public TextChange get(IFile file) {
+		TextChange result= (TextChange)fMap.get(file);
+		if (result == null) {
+			result= new TextFileChange(file.toString(), file);
+			result.setKeepPreviewEdits(fKeepExecutedTextEdits);
+			fMap.put(file, result);
+		}
+		return result;
+	}
+	
+	/**
+	 * Removes the <tt>TextChange</tt> managed under the given key
+	 * <code>unit<code>.
+	 * 
+	 * @param unit the key determining the <tt>TextChange</tt> to be removed.
+	 * @return the removed <tt>TextChange</tt>.
+	 */
+	public TextChange remove(IFile unit) {
+		return (TextChange)fMap.remove(unit);
+	}
+	
+	/**
+	 * Returns all text changes managed by this instance.
+	 * 
+	 * @return all text changes managed by this instance
+	 */
+	public TextChange[] getAllChanges(){
+		return (TextChange[])fMap.values().toArray(new TextChange[fMap.values().size()]);
+	}
+
+	/**
+	 * Returns all files managed by this instance.
+	 * 
+	 * @return all files managed by this instance
+	 */	
+	public IFile[] getAllCompilationUnits(){
+		return (IFile[]) fMap.keySet().toArray(new IFile[fMap.keySet().size()]);
+	}
+	
+	/**
+	 * Clears all associations between resources and text changes.
+	 */
+	public void clear() {
+		fMap.clear();
+	}
+
+	/**
+	 * Returns if any text changes are managed for the specified file.
+	 * 
+	 * @param file the file
+	 * @return <code>true</code> if any text changes are managed for the specified file and <code>false</code> otherwise
+	 */		
+	public boolean containsChangesIn(IFile file){
+		return fMap.containsKey(file);
+	}
+}
+
+
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java
new file mode 100644
index 0000000..93eac43
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java
@@ -0,0 +1,67 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+public class XMLRefactoringComponent implements RefactoringComponent
+{
+	// The name of the component being refactored
+	String name;
+	
+	// The namespace in which component is defined, e.g. XML or WSDL target namespace
+	String targetNamespace;
+	
+	// Optional model object that is refactored
+	Object model;
+	
+	// SED DOM object that underlines the component being refactored
+	IDOMElement domElement;
+
+	public XMLRefactoringComponent(Object modelObject, IDOMElement domElement, String name, String namespace)
+	{
+		super();
+		this.model = modelObject;
+		this.domElement = domElement;
+		this.name = name;
+		this.targetNamespace = namespace;
+		
+		
+	}
+	
+	public XMLRefactoringComponent(IDOMElement domElement, String name, String namespace)
+	{
+		super();
+		this.domElement = domElement;
+		this.name = name;
+		this.targetNamespace = namespace;
+	}
+
+	public Object getModelObject()
+	{
+		return model;
+	}
+
+	public IDOMElement getElement()
+	{
+		return domElement;
+	}
+
+	public String getName()
+	{
+		
+		return name;
+	}
+
+	public String getNamespaceURI()
+	{
+		return targetNamespace;
+	}
+
+	
+	public QualifiedName getTypeQName()
+	{
+		return new QualifiedName(domElement.getNamespaceURI(), domElement.getLocalName());
+	}
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeAnonymousTypeGlobalAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeAnonymousTypeGlobalAction.java
new file mode 100644
index 0000000..6216de7
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeAnonymousTypeGlobalAction.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeAnonymousTypeGlobalCommand;
+import org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeTypeGlobalProcessor;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactoringWizardMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.w3c.dom.Node;
+
+public class MakeAnonymousTypeGlobalAction extends XSDSelectionDispatchAction {
+
+	private String fParentName;
+	private boolean isComplexType = true;
+	private XSDTypeDefinition fSelectedComponent;
+	
+	public MakeAnonymousTypeGlobalAction(ISelection selection, XSDSchema schema) {
+		super(selection, schema);
+		setText(RefactoringWizardMessages.MakeAnonymousTypeGlobalAction_text); //$NON-NLS-1$
+	}
+	
+	public boolean canRun() {
+
+		return fSelectedComponent != null;
+	}
+	
+
+	private String getNewDefaultName(){
+		if(fParentName != null && !"".equals(fParentName)){
+			if(isComplexType){
+				return fParentName + "ComplexType";
+			}
+			else{
+				return fParentName + "SimpleType";
+			}
+		}
+		else{
+			if(isComplexType){
+				return "NewComplexType";
+			}
+			else{
+				return "NewSimpleType";
+			}
+		}
+		
+	}
+	private boolean canEnable(XSDConcreteComponent xsdComponent){
+		if (xsdComponent instanceof XSDComplexTypeDefinition) {
+			fSelectedComponent = (XSDComplexTypeDefinition)xsdComponent;
+			isComplexType = true;
+			XSDComplexTypeDefinition typeDef = (XSDComplexTypeDefinition) xsdComponent;
+			XSDConcreteComponent parent = typeDef.getContainer();
+			if(parent instanceof XSDElementDeclaration){
+				fParentName = ((XSDElementDeclaration)parent).getName();
+				return true;
+			}
+		} 
+		else if (xsdComponent instanceof XSDSimpleTypeDefinition){
+			fSelectedComponent = (XSDSimpleTypeDefinition)xsdComponent;
+			isComplexType = false;
+			XSDSimpleTypeDefinition typeDef = (XSDSimpleTypeDefinition) xsdComponent;
+			XSDConcreteComponent parent = typeDef.getContainer();
+			if(parent instanceof XSDElementDeclaration){
+				fParentName = ((XSDElementDeclaration)parent).getName();
+				return true;
+			}
+			else if(parent instanceof XSDAttributeDeclaration){
+				fParentName = ((XSDAttributeDeclaration)parent).getName();
+				return true;
+			}
+			
+		}
+		return false;
+	}
+
+	protected boolean canEnable(Object selectedObject) {
+		
+		if (selectedObject instanceof XSDConcreteComponent) {
+			return canEnable((XSDConcreteComponent)selectedObject);
+		}
+		else if (selectedObject instanceof Node) {
+			Node node = (Node) selectedObject;
+			XSDConcreteComponent concreteComponent = getSchema().getCorrespondingComponent(node);
+			return canEnable(concreteComponent);
+		
+		}
+		return false;
+		
+	}
+
+	public void run1() {
+		
+		if(fSelectedComponent == null){
+			return;
+		}
+		
+		if(fSelectedComponent.getSchema() == null){
+			getSchema().updateElement(true);
+		}
+		MakeTypeGlobalProcessor processor = new MakeTypeGlobalProcessor(fSelectedComponent, getNewDefaultName());
+		RenameRefactoring refactoring = new RenameRefactoring(processor);
+		try {
+			RefactoringWizard wizard = new RenameRefactoringWizard(
+					refactoring,
+					RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, // TODO: provide correct strings
+					RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null);
+			RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard);
+			op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
+			//triggerBuild();
+		} catch (InterruptedException e) {
+			// do nothing. User action got cancelled
+		}
+		
+	}
+	
+	public void run(){
+		if(fSelectedComponent == null){
+			return;
+		}
+		
+		if(fSelectedComponent.getSchema() == null){
+			getSchema().updateElement(true);
+		}
+		DocumentImpl doc = (DocumentImpl) fSelectedComponent.getElement().getOwnerDocument();
+		doc.getModel().beginRecording(
+						this,
+						RefactoringWizardMessages.MakeAnonymousTypeGlobalAction_text);
+		MakeAnonymousTypeGlobalCommand command = new MakeAnonymousTypeGlobalCommand(
+				fSelectedComponent, getNewDefaultName());
+		command.run();
+		doc.getModel().endRecording(this);
+	}
+	
+	
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java
new file mode 100644
index 0000000..ea4de4e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
+import org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDSchema;
+import org.w3c.dom.Node;
+
+public class MakeLocalElementGlobalAction extends XSDSelectionDispatchAction {
+
+	XSDElementDeclaration fSelectedComponent;
+
+	public MakeLocalElementGlobalAction(ISelection selection, XSDSchema schema) {
+		super(selection, schema);
+        //TODO cs : fix up translation
+        setText("Make Global");
+		//setText(RefactoringMessages.getString("MakeLocalElementGlobalAction.text")); //$NON-NLS-1$
+	}
+	
+	public boolean canRun() {
+
+		return fSelectedComponent != null;
+	}
+
+	protected boolean canEnable(XSDConcreteComponent selectedObject) {
+
+		fSelectedComponent = null;
+		if (selectedObject instanceof XSDElementDeclaration) {
+			XSDElementDeclaration element = (XSDElementDeclaration) selectedObject;
+			if (!element.isElementDeclarationReference() && !element.isGlobal()) {
+				fSelectedComponent = element;
+			}
+		} 
+		return canRun();
+	}
+	
+	
+	protected boolean canEnable(Object selectedObject) {
+		
+		if (selectedObject instanceof XSDConcreteComponent) {
+			return canEnable((XSDConcreteComponent)selectedObject);
+		}
+		else if (selectedObject instanceof Node) {
+			Node node = (Node) selectedObject;
+			XSDConcreteComponent concreteComponent = getSchema()
+					.getCorrespondingComponent(node);
+			return canEnable(concreteComponent);
+		}
+		return false;
+		
+	}
+
+
+	public void run() {
+		DocumentImpl doc = (DocumentImpl) fSelectedComponent.getElement()
+				.getOwnerDocument();
+		doc.getModel().beginRecording(this, getText());
+		MakeLocalElementGlobalCommand command = new MakeLocalElementGlobalCommand(
+				fSelectedComponent);
+		command.run();
+		doc.getModel().endRecording(this);
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java
new file mode 100644
index 0000000..6b1d8b8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java
@@ -0,0 +1,108 @@
+
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactoringWizardMessages;
+
+
+
+/**
+* Renames a XML Schema element or workbench resource.
+* <p>
+* Action is applicable to selections containing elements of type
+* <code></code> or <code>IResource</code>.
+* 
+* <p>
+* This class may be instantiated; it is not intended to be subclassed.
+* </p>
+
+*/
+public class RenameAction extends SelectionDispatchAction  {
+
+	private SelectionDispatchAction renameComponentAction;
+	private SelectionDispatchAction renameResourceAction;
+	
+	
+	public RenameAction(ISelection selection) {
+		super(selection);
+		setText(RefactoringWizardMessages.RenameAction_text); 
+		renameResourceAction= new RenameResourceAction(selection);
+		renameResourceAction.setText(getText());
+		
+	}
+	public RenameAction(ISelection selection, Object model) {
+		super(selection);
+		setText(RefactoringWizardMessages.RenameAction_text);
+		renameComponentAction= new RenameComponentAction(selection, model);
+		renameComponentAction.setText(getText());
+		renameResourceAction= new RenameResourceAction(selection);
+		renameResourceAction.setText(getText());
+		
+	}
+	
+
+	
+	/*
+	 * @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
+	 */
+	public void selectionChanged(SelectionChangedEvent event) {
+		renameComponentAction.selectionChanged(event);
+		if (renameResourceAction != null)
+			renameResourceAction.selectionChanged(event);
+		setEnabled(computeEnabledState());		
+	}
+
+	/*
+	 * @see SelectionDispatchAction#update(ISelection)
+	 */
+	public void update(ISelection selection) {
+		if(renameComponentAction != null){
+			renameComponentAction.update(selection);
+		}
+		if (renameResourceAction != null)
+			renameResourceAction.update(selection);
+		setEnabled(computeEnabledState());		
+	}
+	
+	private boolean computeEnabledState(){
+		if (renameResourceAction != null) {
+			return renameComponentAction.isEnabled() || renameResourceAction.isEnabled();
+		} else {
+			return renameComponentAction.isEnabled();
+		}
+	}
+	
+	public void run(IStructuredSelection selection) {
+		if (renameComponentAction != null && renameComponentAction.isEnabled())
+			renameComponentAction.run(selection);
+		if (renameResourceAction != null && renameResourceAction.isEnabled())
+			renameResourceAction.run(selection);
+	}
+
+	public void run(ITextSelection selection) {
+		if (renameComponentAction != null && renameComponentAction.canRun())
+			renameComponentAction.run(selection);
+		else
+			MessageDialog.openInformation(XSDEditorPlugin.getShell(), RefactoringWizardMessages.RenameAction_rename, RefactoringWizardMessages.RenameAction_unavailable);  
+	}
+	public void run(ISelection selection) {
+	    if(selection == null){
+	    	super.run();
+	    }
+	    else{
+	    	super.run(selection);
+	    }
+		
+	}
+	public final void setRenameComponentAction(
+			SelectionDispatchAction renameComponentAction)
+	{
+		this.renameComponentAction = renameComponentAction;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameComponentAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameComponentAction.java
new file mode 100644
index 0000000..7cbc3fe
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameComponentAction.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.ui.actions.GlobalBuildAction;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringComponent;
+import org.eclipse.wst.xsd.ui.internal.refactor.XMLRefactoringComponent;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameComponentProcessor;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactoringWizardMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.w3c.dom.Node;
+
+public class RenameComponentAction extends XSDSelectionDispatchAction {
+
+	private XSDNamedComponent selectedComponent;
+
+	public RenameComponentAction(ISelection selection,
+			Object aModel) {
+		super(selection, aModel);
+	
+	}
+
+	protected boolean canEnable(XSDConcreteComponent selectedObject) {
+
+		selectedComponent = null;
+		if (selectedObject instanceof XSDNamedComponent) {
+			selectedComponent = (XSDNamedComponent) selectedObject;
+
+			// if it's element reference, then this action is not appropriate
+			if (selectedComponent instanceof XSDElementDeclaration) {
+				XSDElementDeclaration element = (XSDElementDeclaration) selectedComponent;
+				if (element.isElementDeclarationReference()) {
+					selectedComponent = null;
+				}
+			}
+			if(selectedComponent instanceof XSDTypeDefinition){
+				XSDTypeDefinition type = (XSDTypeDefinition) selectedComponent;
+				XSDConcreteComponent parent = type.getContainer();
+				if (parent instanceof XSDElementDeclaration) {
+					XSDElementDeclaration element = (XSDElementDeclaration) parent;
+					if(element.getAnonymousTypeDefinition().equals(type)){
+						selectedComponent = null;
+					}
+				}
+				else if(parent instanceof XSDAttributeDeclaration) {
+					XSDAttributeDeclaration element = (XSDAttributeDeclaration) parent;
+					if(element.getAnonymousTypeDefinition().equals(type)){
+						selectedComponent = null;
+					}
+				}
+			}
+		}
+
+		return canRun();
+	}
+
+	protected boolean canEnable(Object selectedObject) {
+
+		if (selectedObject instanceof XSDConcreteComponent) {
+			return canEnable((XSDConcreteComponent) selectedObject);
+		} else if (selectedObject instanceof Node) {
+			Node node = (Node) selectedObject;
+			if (getSchema() != null) {
+				XSDConcreteComponent concreteComponent = getSchema()
+						.getCorrespondingComponent(node);
+				return canEnable(concreteComponent);
+			}
+		}
+		return false;
+
+	}
+
+	public boolean canRun() {
+
+		return selectedComponent != null;
+	}
+
+	public void run(ISelection selection) {
+		if (selectedComponent.getName() == null) {
+			selectedComponent.setName(new String());
+		}
+		if (selectedComponent.getSchema() == null) {
+			if (getSchema() != null) {
+				getSchema().updateElement(true);
+			}
+
+		}
+		RefactoringComponent component = new XMLRefactoringComponent(
+				selectedComponent,
+				(IDOMElement)selectedComponent.getElement(), 
+				selectedComponent.getName(),
+				selectedComponent.getTargetNamespace());
+		
+		RenameComponentProcessor processor = new RenameComponentProcessor(
+				component, selectedComponent.getName());
+		RenameRefactoring refactoring = new RenameRefactoring(processor);
+		try {
+			RefactoringWizard wizard = new RenameRefactoringWizard(
+					refactoring,
+					RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, 
+					RefactoringWizardMessages
+							.RenameComponentWizard_inputPage_description, 
+					null);
+			RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(
+					wizard);
+			op.run(XSDEditorPlugin.getShell(), wizard
+					.getDefaultPageTitle());
+			triggerBuild();
+		} catch (InterruptedException e) {
+			// do nothing. User action got cancelled
+		}
+
+	}
+
+	public static void triggerBuild() {
+		if (ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding()) {
+			new GlobalBuildAction(XSDEditorPlugin.getPlugin().getWorkbench()
+					.getActiveWorkbenchWindow(),
+					IncrementalProjectBuilder.INCREMENTAL_BUILD).run();
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceAction.java
new file mode 100644
index 0000000..722e5e9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceAction.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameResourceProcessor;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactoringWizardMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard;
+
+
+
+public class RenameResourceAction extends SelectionDispatchAction {
+
+
+
+	
+	public RenameResourceAction(ISelection selection)
+	{
+		super(selection);
+	}
+
+	public void selectionChanged(IStructuredSelection selection) {
+		IResource element= getResource(selection);
+		if (element == null) {
+			setEnabled(false);
+		} else {
+			RenameResourceProcessor processor= new RenameResourceProcessor(element);
+			setEnabled(processor.isApplicable());
+			
+		}
+	}
+
+	public void run(IStructuredSelection selection) {
+		IResource resource = getResource(selection);
+		RenameResourceProcessor processor= new RenameResourceProcessor(resource);
+
+			if(!processor.isApplicable())
+				return;
+			RenameRefactoring refactoring= new RenameRefactoring(processor);
+			try {
+				RefactoringWizard wizard = new RenameRefactoringWizard(
+						refactoring,
+						RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, //TODO: provide correct strings
+						RefactoringWizardMessages.RenameComponentWizard_inputPage_description, 
+						null);
+				RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard);
+				op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
+			} catch (InterruptedException e) {
+				// do nothing. User action got cancelled
+			}
+			
+	}
+	
+	private static IResource getResource(IStructuredSelection selection) {
+		if (selection.size() != 1)
+			return null;
+		Object first= selection.getFirstElement();
+		if (! (first instanceof IResource))
+			return null;
+		return (IResource)first;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceActionDelegate.java
new file mode 100644
index 0000000..073f55d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceActionDelegate.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @author ebelisar@ca.ibm.com
+ */
+public class RenameResourceActionDelegate implements IObjectActionDelegate {
+	
+	private ISelection fCurrentSelection;
+
+	private IWorkbenchPart fPart;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+		fPart = targetPart;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+		if (fCurrentSelection instanceof IStructuredSelection) {
+			IStructuredSelection structuredSelection= (IStructuredSelection) fCurrentSelection;
+			Object first= structuredSelection.getFirstElement();
+			if (first instanceof IFile) {
+				RenameResourceAction renameAction = new RenameResourceAction(structuredSelection);
+				renameAction.run(structuredSelection);
+			}
+		}
+
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		fCurrentSelection= selection;
+
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameTargetNamespaceAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameTargetNamespaceAction.java
new file mode 100644
index 0000000..e7dac64
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameTargetNamespaceAction.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.ui.actions.GlobalBuildAction;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameTargetNamespaceProcessor;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactoringWizardMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard;
+
+public class RenameTargetNamespaceAction extends XSDSelectionDispatchAction {
+
+	public RenameTargetNamespaceAction(ISelection selection,
+			Object aModel) {
+		super(selection, aModel);
+		setText(RefactoringWizardMessages.RenameTargetNamespace_text);
+
+	}
+
+
+	protected boolean canEnable(Object selectedObject) {
+
+		return getSchema() != null;
+
+	}
+	
+	public boolean canRun() {
+
+		return getSchema() != null;
+	}
+
+
+	public void run(ISelection selection) {
+
+		
+		RenameTargetNamespaceProcessor processor = new RenameTargetNamespaceProcessor(getSchema(), getSchema().getTargetNamespace());
+		RenameRefactoring refactoring = new RenameRefactoring(processor);
+		try {
+			RefactoringWizard wizard = new RenameRefactoringWizard(
+					refactoring,
+					RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle,//TODO: provide correct strings
+					RefactoringWizardMessages.RenameComponentWizard_inputPage_description, 
+					null);
+			RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(
+					wizard);
+			op.run(XSDEditorPlugin.getShell(), wizard
+					.getDefaultPageTitle());
+			triggerBuild();
+		} catch (InterruptedException e) {
+			// do nothing. User action got cancelled
+		}
+
+	}
+
+	public static void triggerBuild() {
+		if (ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding()) {
+			new GlobalBuildAction(XSDEditorPlugin.getPlugin().getWorkbench()
+					.getActiveWorkbenchWindow(),
+					IncrementalProjectBuilder.INCREMENTAL_BUILD).run();
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/SelectionDispatchAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/SelectionDispatchAction.java
new file mode 100644
index 0000000..879eb31
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/SelectionDispatchAction.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+
+
+/**
+ * Action that dispatches the <code>IAction#run()</code> and the 
+ * <code>ISelectionChangedListener#selectionChanged</code> 
+ * according to the type of the selection. 
+ * 
+ * <ul>
+ * 	<li>if selection is of type <code>ITextSelection</code> then
+ * 	<code>run(ITextSelection)</code> and <code>selectionChanged(ITextSelection)</code>
+ * 	is called.</li> 
+ * 	<li>if selection is of type <code>IStructuredSelection</code> then
+ * 	<code>run(IStructuredSelection)</code> and <code>
+ * 	selectionChanged(IStructuredSelection)</code> is called.</li>
+ * 	<li>default is to call <code>run(ISelection)</code> and <code>
+ * 	selectionChanged(ISelection)</code>.</li>
+ * </ul>
+ * 
+ * <p>
+ * adapted from <code>org.eclipse.jdt.ui.actions.SelectionDispatchAction</code>
+ * </p>
+ *   
+ * 
+ */
+public abstract class SelectionDispatchAction extends Action implements ISelectionChangedListener {
+	
+	private ISelection selection;
+	
+	private Object model;
+	
+	protected SelectionDispatchAction(ISelection selection) {
+		Assert.isNotNull(selection);
+		this.selection = selection;
+		
+	}
+
+	/**
+	 * Returns the selection provided by the site owning this action.
+	 * 
+	 * @return the site's selection
+	 */	
+	public ISelection getSelection() {
+		return selection;
+	}
+	
+	/**
+	 * Updates the action's enablement state according to the given selection. This
+	 * default implementation calls one of the <code>selectionChanged</code>
+	 * methods depending on the type of the passed selection.
+	 * 
+	 * @param selection the selection this action is working on
+	 */
+	public void update(ISelection selection) {
+		dispatchSelectionChanged(selection);
+	}
+
+	/**
+	 * Notifies this action that the given structured selection has changed. This default
+	 * implementation calls <code>selectionChanged(ISelection selection)</code>.
+	 * 
+	 * @param selection the new selection
+ 	 */
+	public void selectionChanged(IStructuredSelection selection) {
+		if (selection.size() == 1) {
+			Object object = selection.getFirstElement();
+			setEnabled(canEnable(object));
+		}
+		else{
+			setEnabled(false);
+		}
+	}
+	
+	protected boolean canEnable(Object selectedObject){
+		return false;
+	}
+
+	/**
+	 * Executes this actions with the given structured selection. This default implementation
+	 * calls <code>run(ISelection selection)</code>.
+	 */
+	public void run(IStructuredSelection selection) {
+		run((ISelection)selection);
+	}
+
+	
+	/**
+	 * Notifies this action that the given text selection has changed.  This default
+	 * implementation calls <code>selectionChanged(ISelection selection)</code>.
+	 * 
+	 * @param selection the new selection
+ 	 */
+	public void selectionChanged(ITextSelection selection) {
+		selectionChanged((ISelection)selection);
+	}
+	
+	/**
+	 * Executes this actions with the given text selection. This default implementation
+	 * calls <code>run(ISelection selection)</code>.
+	 */
+	public void run(ITextSelection selection) {
+		run((ISelection)selection);
+	}
+	
+	/**
+	 * Notifies this action that the given selection has changed.  This default
+	 * implementation sets the action's enablement state to <code>false</code>.
+	 * 
+	 * @param selection the new selection
+ 	 */
+	public void selectionChanged(ISelection selection) {
+		setEnabled(false);
+	}
+	
+	/**
+	 * Executes this actions with the given selection. This default implementation
+	 * does nothing.
+	 */
+	public void run(ISelection selection) {
+		System.out.println("SelectionDispatchAction.run");
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on IAction.
+	 */
+	public void run() {
+		dispatchRun(getSelection());
+		
+	}
+	
+	/* (non-Javadoc)
+	 * Method declared on ISelectionChangedListener.
+	 */
+	public void selectionChanged(SelectionChangedEvent event) {
+		dispatchSelectionChanged(event.getSelection());
+	}
+
+	private void dispatchSelectionChanged(ISelection selection) {
+		if (selection instanceof IStructuredSelection) {
+			selectionChanged((IStructuredSelection)selection);
+		} else if (selection instanceof ITextSelection) {
+			selectionChanged((ITextSelection)selection);
+		} else {
+			selectionChanged(selection);
+		}
+	}
+
+	protected void dispatchRun(ISelection selection) {
+		if (selection instanceof IStructuredSelection) {
+			run((IStructuredSelection)selection);
+		}  else if (selection instanceof ITextSelection) {
+			run((ITextSelection)selection);
+		} else {
+			run(selection);
+		}
+	}
+
+	public final Object getModel()
+	{
+		return model;
+	}
+
+	public final void setModel(Object model)
+	{
+		this.model = model;
+	}
+	
+	public boolean canRun() {
+
+		return true;
+	}
+
+	
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java
new file mode 100644
index 0000000..950fc6f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java
@@ -0,0 +1,59 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import java.util.ArrayList;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactorActionGroup;
+import org.eclipse.xsd.XSDSchema;
+
+public class XSDRefactorActionGroup extends RefactorActionGroup {
+
+	private static final String MAKE_ELEMENT_GLOBAL = "org.eclipse.wst.xsd.ui.refactor.makeElementGlobal"; //$NON-NLS-1$
+
+	private static final String MAKE_TYPE_GLOBAL = "org.eclipse.wst.xsd.ui.refactor.makeTypeGlobal"; //$NON-NLS-1$
+
+	private static final String RENAME_ELEMENT = "org.eclipse.wst.xsd.ui.refactor.rename.element"; //$NON-NLS-1$
+
+	private static final String RENAME_TARGET_NAMESPCE = "org.eclipse.wst.xsd.ui.refactor.renameTargetNamespace"; //$NON-NLS-1$
+
+	private SelectionDispatchAction fMakeLocalElementGlobal;
+
+	private SelectionDispatchAction fMakeLocalTypeGlobal;
+
+	public XSDRefactorActionGroup(ISelection selection,
+			XSDSchema schema) {
+		super(selection);
+		fEditorActions = new ArrayList();
+		fRenameAction = new RenameAction(selection, schema);
+		fRenameAction.setActionDefinitionId(RENAME_ELEMENT);
+		fEditorActions.add(fRenameAction);
+
+		fRenameTargetNamespace = new RenameTargetNamespaceAction(
+				selection, schema);
+		fRenameTargetNamespace.setActionDefinitionId(RENAME_TARGET_NAMESPCE);
+		fEditorActions.add(fRenameTargetNamespace);
+
+		fMakeLocalElementGlobal = new MakeLocalElementGlobalAction(
+				selection, schema);
+		fMakeLocalElementGlobal.setActionDefinitionId(MAKE_ELEMENT_GLOBAL);
+		fEditorActions.add(fMakeLocalElementGlobal);
+
+		fMakeLocalTypeGlobal = new MakeAnonymousTypeGlobalAction(
+				selection, schema);
+		fMakeLocalTypeGlobal.setActionDefinitionId(MAKE_TYPE_GLOBAL);
+		fEditorActions.add(fMakeLocalTypeGlobal);
+
+		initAction(fRenameAction, selection);
+		initAction(fRenameTargetNamespace, selection);
+		initAction(fMakeLocalElementGlobal, selection);
+		initAction(fMakeLocalTypeGlobal, selection);
+	}
+
+	public void dispose() {
+//		disposeAction(fRenameAction, selection);
+//		disposeAction(fMakeLocalElementGlobal, selection);
+//		disposeAction(fMakeLocalTypeGlobal, selection);
+//		disposeAction(fRenameTargetNamespace, selection);
+		super.dispose();
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java
new file mode 100644
index 0000000..965fc4e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java
@@ -0,0 +1,85 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import java.io.IOException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactorActionGroup;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactorGroupActionDelegate;
+import org.eclipse.wst.xsd.ui.internal.refactor.wizard.RefactorGroupSubMenu;
+import org.eclipse.xsd.XSDFactory;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.util.XSDResourceImpl;
+
+public class XSDRefactorGroupActionDelegate extends RefactorGroupActionDelegate {
+
+	public XSDRefactorGroupActionDelegate() {
+		super();
+	}
+
+	/**
+	 * Fills the menu with applicable refactor sub-menues
+	 * @param menu The menu to fill
+	 */
+	protected void fillMenu(Menu menu) {
+		if (fSelection == null) {
+			return;
+		}
+		if (workbenchPart != null) {
+			IWorkbenchPartSite site = workbenchPart.getSite();
+			if (site == null)
+				return;
+	
+			IEditorPart editor = site.getPage().getActiveEditor();
+			if (editor != null) {
+				IEditorInput editorInput = editor.getEditorInput();
+				if(editorInput instanceof IFileEditorInput){
+					IFileEditorInput fileInput = (IFileEditorInput)editorInput;
+					XSDSchema schema = createXMLSchema(fileInput.getFile(), resourceSet);
+					RefactorActionGroup refactorMenuGroup = new XSDRefactorActionGroup(fSelection, schema);
+					RefactorGroupSubMenu subMenu = new RefactorGroupSubMenu(refactorMenuGroup);
+					subMenu.fill(menu, -1);
+				}
+				
+			}
+		
+		}
+	
+	}
+	
+	public static XSDSchema createXMLSchema(IFile file, ResourceSet set)  {
+		
+		URI uri = URI.createFileURI(file.getLocation().toString());
+		XSDSchema schema = XSDFactory.eINSTANCE.createXSDSchema();
+		// we need this model to be able to get locations
+		try {
+			IStructuredModel structuredModel = StructuredModelManager.getModelManager().getModelForEdit(file);
+			IDOMModel domModel = (IDOMModel) structuredModel;
+			Resource xsdResource = new XSDResourceImpl();
+			xsdResource.setURI(uri);
+			schema = XSDFactory.eINSTANCE.createXSDSchema();
+			xsdResource.getContents().add(schema);
+			schema.setElement(domModel.getDocument().getDocumentElement());
+			if(set != null){
+				set.getResources().add(xsdResource);
+			}
+		} catch (IOException e) {
+			// do nothing
+		} catch (CoreException e) {
+			// do nothing
+		}
+		return schema;
+	}
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java
new file mode 100644
index 0000000..05c72d4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java
@@ -0,0 +1,29 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.actions;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.xsd.XSDSchema;
+
+public class XSDSelectionDispatchAction extends SelectionDispatchAction
+{
+
+	
+	
+	public XSDSelectionDispatchAction(ISelection selection, Object model)
+	{
+		super(selection);
+		setModel(model);
+	}
+
+	protected XSDSchema getSchema(){
+		Object model = getModel();
+		if(model instanceof XSDSchema)
+		{
+			return (XSDSchema) model;
+		}
+	
+		return null;
+	}
+
+	
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/messages.properties b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/messages.properties
new file mode 100644
index 0000000..48483a1
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/messages.properties
@@ -0,0 +1,41 @@
+RefactorMenu.label=Refactor
+RefactorActionGroup.no_refactoring_available=<no refactoring available>
+
+RenameAction.rename=Rename
+RenameAction.unavailable=Operation unavailable on the current selection.\nSelect a ....
+RenameAction.text=Re&name...
+
+RenameInputWizardPage.new_name= &New name:
+RenameRefactoringWizard.internal_error= Internal error during name checking: {0}
+
+
+RenameXSDElementAction.exception=Unexpected exception occurred. See log for details
+RenameXSDElementAction.not_available=Operation unavailable on the current selection.\nSelect a XSD project, folder, resource, file, attribute declarations,  attribute group definitions, complex type definitions, element declarations, identity constraint definitions, model groups definitions, notation declarations, or simple type definitions.
+RenameXSDElementAction.name=Rename
+
+
+RenameSupport.dialog.title=Rename
+RenameSupport.not_available=Rename support not available
+
+RenameComponentWizard.defaultPageTitle=Rename wizard
+RenameComponentWizard.inputPage.description=Rename XML Schema component
+
+RenameInputWizardPage.update_references=Update references
+XSDComponentRenameChange.name=XML Schema component renaming in {0}: {1} to {2}
+XSDComponentRenameChange.Renaming=Renaming...
+ResourceRenameParticipant.compositeChangeName=XSD file rename references updating changes
+RenameResourceChange.rename_resource_reference_change=Renaming resource name references
+XSDRenameResourceChange.name=Resource rename: {0} to {1}
+RenameResourceRefactoring.Internal_Error=Internal error
+RenameResourceRefactoring.alread_exists=Resource already exist
+RenameResourceRefactoring.invalidName=Invalid resource name
+RenameResourceProcessor.name=Resource renaming
+MakeLocalElementGlobalAction.text=Make Local Element Global
+XSDComponentRenameParticipant.Component_Refactoring_updates=XML Schema refactoring changes
+WSDLComponentRenameParticipant.Component_Refactoring_updates=WSDL refactoring changes
+RenameComponentProcessor.Component_Refactoring_updates=Component name refactoring changes
+RenameComponentProcessor.Component_Refactoring_update_declatation=Update component declaration/definition
+RenameComponentProcessor.Component_Refactoring_update_reference=Update component reference
+XSDComponentRenameParticipant.xsd_component_rename_participant=XSD component rename participant
+WSDLComponentRenameParticipant.wsdl_component_rename_participant=WSDL component rename participant
+ResourceRenameParticipant.File_Rename_update_reference=File rename refactoring changes
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java
new file mode 100644
index 0000000..f90685d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java
@@ -0,0 +1,41 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.Map;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+import org.eclipse.wst.xsd.ui.internal.refactor.TextChangeManager;
+
+public class ComponentRenameArguments extends RenameArguments {
+	
+	TextChangeManager changeManager;
+	Map matches;
+	String qualifier;
+
+	public ComponentRenameArguments(String newName, boolean updateReferences) {
+		super(newName, updateReferences);
+	}
+
+	public TextChangeManager getChangeManager() {
+		return changeManager;
+	}
+
+	public void setChangeManager(TextChangeManager changeManager) {
+		this.changeManager = changeManager;
+	}
+
+	public Map getMatches() {
+		return matches;
+	}
+
+	public void setMatches(Map matches) {
+		this.matches = matches;
+	}
+
+	public String getQualifier() {
+		return qualifier;
+	}
+
+	public void setQualifier(String qualifier) {
+		this.qualifier = qualifier;
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java
new file mode 100644
index 0000000..fea1823
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java
@@ -0,0 +1,484 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.ParticipantManager;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.wst.common.core.search.SearchEngine;
+import org.eclipse.wst.common.core.search.SearchMatch;
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.eclipse.wst.common.core.search.scope.SearchScope;
+import org.eclipse.wst.common.core.search.scope.SelectionSearchScope;
+import org.eclipse.wst.common.core.search.scope.WorkspaceSearchScope;
+import org.eclipse.wst.common.core.search.util.CollectingSearchRequestor;
+import org.eclipse.wst.xml.core.internal.search.XMLComponentDeclarationPattern;
+import org.eclipse.wst.xml.core.internal.search.XMLComponentReferencePattern;
+import org.eclipse.wst.xsd.ui.internal.refactor.Checks;
+import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.IReferenceUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringComponent;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.TextChangeManager;
+import org.eclipse.wst.xsd.ui.internal.refactor.util.TextChangeCompatibility;
+
+
+
+public class RenameComponentProcessor extends RenameProcessor implements INameUpdating, IReferenceUpdating {
+	public static final String IDENTIFIER = "org.eclipse.wst.xml.refactor.renameComponentProcessor"; //$NON-NLS-1$
+
+	public static String quoteString(String value) {
+		value = value == null ? "" : value;
+
+		StringBuffer sb = new StringBuffer();
+		if (!value.startsWith("\"")) {
+			sb.append("\"");
+		}
+		sb.append(value);
+		if (!value.endsWith("\"")) {
+			sb.append("\"");
+		}
+		return sb.toString();
+	}
+
+	private TextChangeManager changeManager;
+
+	private String newName;
+
+	private RefactoringComponent selectedComponent;
+
+	private boolean updateReferences = true;
+
+	private Map references = new HashMap();
+
+	public RenameComponentProcessor(RefactoringComponent selectedComponent) {
+		this.selectedComponent = selectedComponent;
+	}
+
+	public RenameComponentProcessor(RefactoringComponent selectedComponent, String newName) {
+		this.newName = newName;
+		this.selectedComponent = selectedComponent;
+	}
+
+	private void addDeclarationUpdate(TextChangeManager manager) throws CoreException {
+		String fileStr = selectedComponent.getElement().getModel().getBaseLocation();
+		IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileStr));
+		addDeclarationUpdate(manager, file);
+	}
+
+	final void addDeclarationUpdate(TextChangeManager manager, IFile file) throws CoreException {
+
+		String componentName = selectedComponent.getName();
+		String componentNamespace = selectedComponent.getNamespaceURI();
+		QualifiedName elementQName = new QualifiedName(componentNamespace, componentName);
+		QualifiedName typeQName = selectedComponent.getTypeQName();
+
+
+
+		SearchScope scope = new WorkspaceSearchScope();
+		if (file != null) {
+			scope = new SelectionSearchScope(new IResource[]{file});
+		}
+		CollectingSearchRequestor requestor = new CollectingSearchRequestor();
+		SearchPattern pattern = new XMLComponentDeclarationPattern(file, elementQName, typeQName);
+		SearchEngine searchEngine = new SearchEngine();
+		searchEngine.search(pattern, requestor, scope, new NullProgressMonitor());
+		List results = requestor.getResults();
+		for (Iterator iter = results.iterator(); iter.hasNext();) {
+			SearchMatch match = (SearchMatch) iter.next();
+			if (match != null) {
+				TextChange textChange = manager.get(match.getFile());
+				String newName = getNewElementName();
+				newName = quoteString(newName);
+
+				ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), match.getLength(), newName);
+				String editName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_declatation");;
+				TextChangeCompatibility.addTextEdit(textChange, editName, replaceEdit);
+			}
+		}
+	}
+
+	void addOccurrences(TextChangeManager manager, IProgressMonitor pm, RefactoringStatus status) throws CoreException {
+
+		String fileStr = selectedComponent.getElement().getModel().getBaseLocation();
+		IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileStr));
+
+		String componentName = selectedComponent.getName();
+		String componentNamespace = selectedComponent.getNamespaceURI();
+		QualifiedName elementQName = new QualifiedName(componentNamespace, componentName);
+		QualifiedName typeQName = selectedComponent.getTypeQName();
+
+		SearchEngine searchEngine = new SearchEngine();
+
+		SortingSearchRequestor requestor = new SortingSearchRequestor();
+		SearchPattern pattern = new XMLComponentReferencePattern(file, elementQName, typeQName);
+		searchEngine.search(pattern, requestor, new WorkspaceSearchScope(), new NullProgressMonitor());
+		references = requestor.getResults();
+		// for (Iterator iter = references.iterator(); iter.hasNext();) {
+		// SearchMatch match = (SearchMatch) iter.next();
+
+		// TextChange textChange = manager.get(match.getFile());
+		// String newName = getNewElementName();
+		// if(match.getObject() instanceof Node){
+		// Node node = (Node)match.getObject();
+		// if(node instanceof IDOMAttr){
+		// IDOMAttr attr = (IDOMAttr)node;
+		// IDOMElement element = (IDOMElement)attr.getOwnerElement() ;
+		// newName = getNewQName(element, componentNamespace, newName);
+		// }
+		// newName = quoteString(newName);
+		// }
+		//				
+		// ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(),
+		// match.getLength(), newName );
+		// String editName =
+		// RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_reference");
+		// TextChangeCompatibility.addTextEdit(textChange, editName,
+		// replaceEdit);
+
+		// }
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#canEnableTextUpdating()
+	 */
+	public boolean canEnableTextUpdating() {
+		return true;
+	}
+
+	public boolean canEnableUpdateReferences() {
+		return true;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
+	 */
+	public RefactoringStatus checkFinalConditions(IProgressMonitor monitor, CheckConditionsContext context) throws CoreException, OperationCanceledException {
+		Assert.isNotNull(monitor);
+		Assert.isNotNull(context);
+		final RefactoringStatus status = new RefactoringStatus();
+		try {
+			monitor.beginTask("", 2); //$NON-NLS-1$
+			monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_checking");
+			status.merge(checkNewElementName(getNewElementName()));
+			monitor.worked(1);
+			monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_searching");
+			status.merge(createRenameChanges(new SubProgressMonitor(monitor, 1)));
+		}
+		finally {
+			monitor.done();
+		}
+		return status;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		// TODO add code to check initial conditions for component rename
+		Assert.isNotNull(pm);
+		try {
+			return new RefactoringStatus();
+		}
+		finally {
+			pm.done();
+		}
+
+	}
+
+	public final RefactoringStatus checkNewElementName(final String name) {
+		Assert.isNotNull(name);
+		final RefactoringStatus result = Checks.checkName(name);
+		result.merge(Checks.checkComponentName(name));
+		if (Checks.isAlreadyNamed(selectedComponent, name))
+			result.addFatalError("RefactoringMessages.RenameComponentRefactoring_another_name");
+		return result;
+	}
+
+	private Object[] computeDerivedElements() {
+
+		Object[] elements = getElements();
+		// Object[] results = new Object[elements.length];
+		// for(int i=0; i< elements.length; i++){
+		// RefactoringComponent component = (RefactoringComponent)elements[i];
+		// results[i] = component.getAdaptee();
+		//			
+		// }
+		return elements;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		// don't create any change now, all the changes are in changeManger
+		// variable and will be combined in postCreateChange method
+		return null;
+	}
+
+	private TextChangeManager updateChangeManager(IProgressMonitor pm, RefactoringStatus status) throws CoreException {
+		TextChangeManager manager = getChangeManager();
+		System.out.println("addDeclarationUpate-------------------");
+		// only one declaration gets updated
+		addDeclarationUpdate(manager);
+		if (getUpdateReferences()) {
+			System.out.println("addOccurences--------------------------");
+			addOccurrences(manager, pm, status);
+		}
+		return manager;
+	}
+
+	private RefactoringStatus createRenameChanges(final IProgressMonitor monitor) throws CoreException {
+		Assert.isNotNull(monitor);
+		final RefactoringStatus status = new RefactoringStatus();
+		try {
+			monitor.beginTask("RefactoringMessages.RenameComponentRefactoring_searching", 1);
+			updateChangeManager(new SubProgressMonitor(monitor, 1), status);
+		}
+		finally {
+			monitor.done();
+		}
+		return status;
+	}
+
+	public TextChangeManager getChangeManager() {
+
+		if (changeManager == null) {
+			changeManager = new TextChangeManager(false);
+		}
+		return changeManager;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.xsd.internal.refactoring.rename.XSDRenameProcessor#getAffectedProjectNatures()
+	 */
+	protected String[] getAffectedProjectNatures() throws CoreException {
+		// TODO: find project natures of the files that are going to be
+		// refactored
+		return new String[]{"org.eclipse.jdt.core.javanature"};
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#getCurrentElementName()
+	 */
+	public String getCurrentElementName() {
+		//
+		return selectedComponent.getName();
+	}
+
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
+	 */
+	public Object[] getElements() {
+		Object model = selectedComponent.getModelObject();
+		if (model != null) {
+			return new Object[]{model};
+		}
+		return new Object[0];
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getIdentifier()
+	 */
+	public String getIdentifier() {
+		return IDENTIFIER;
+	}
+
+	public String getNewElementName() {
+		return newName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getProcessorName()
+	 */
+	public String getProcessorName() {
+		return RefactoringMessages.getFormattedString("RenameComponentRefactoring.name", //$NON-NLS-1$
+					new String[]{selectedComponent.getNamespaceURI() + ":" + selectedComponent.getName(), newName});
+
+	}
+
+
+	public boolean getUpdateReferences() {
+		return updateReferences;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#isApplicable()
+	 */
+	public boolean isApplicable() throws CoreException {
+		if (selectedComponent == null)
+			return false;
+		// TODO implement isApplicable logic for the named component,
+		// verify how it is different from other condition checks
+		// if (fNamedComponent.isAnonymous())
+		// return false;
+		// if (! Checks.isAvailable(fType))
+		// return false;
+		// if (isSpecialCase(fType))
+		// return false;
+		return true;
+	}
+
+	protected void loadDerivedParticipants(RefactoringStatus status, List result, Object[] derivedElements, ComponentRenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException {
+		if (derivedElements != null) {
+			for (int i = 0; i < derivedElements.length; i++) {
+				RenameParticipant[] participants = ParticipantManager.loadRenameParticipants(status, this, derivedElements[i], arguments, natures, shared);
+				result.addAll(Arrays.asList(participants));
+			}
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.xsd.internal.refactoring.rename.XSDRenameProcessor#loadDerivedParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus,
+	 *      java.util.List, java.lang.String[],
+	 *      org.eclipse.ltk.core.refactoring.participants.SharableParticipants)
+	 */
+	protected void loadDerivedParticipants(RefactoringStatus status, List result, String[] natures, SharableParticipants shared) throws CoreException {
+		ComponentRenameArguments arguments = new ComponentRenameArguments(getNewElementName(), getUpdateReferences());
+		arguments.setMatches(references);
+		arguments.setQualifier(selectedComponent.getNamespaceURI());
+		// pass in changeManger to the participants so that it can collect all
+		// changes/per files
+		arguments.setChangeManager(getChangeManager());
+		loadDerivedParticipants(status, result, computeDerivedElements(), arguments, natures, shared);
+	}
+
+	protected void loadElementParticipants(RefactoringStatus status, List result, RenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException {
+		Object[] elements = new Object[0];// getElements();
+		for (int i = 0; i < elements.length; i++) {
+			result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, this, elements[i], arguments, natures, shared)));
+		}
+	}
+
+
+	public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
+		RenameArguments arguments = new RenameArguments(getNewElementName(), getUpdateReferences());
+		String[] natures = getAffectedProjectNatures();
+		List result = new ArrayList();
+		loadElementParticipants(status, result, arguments, natures, sharedParticipants);
+		loadDerivedParticipants(status, result, natures, sharedParticipants);
+		for (Iterator i = result.iterator(); i.hasNext();) {
+			Object o = i.next();
+			if (o instanceof XMLComponentRenameParticipant) {
+				XMLComponentRenameParticipant p = (XMLComponentRenameParticipant) o;
+				// getChangeManager()
+				p.setChangeManager(getChangeManager());
+			}
+		}
+
+		return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
+	}
+
+	public void setNewElementName(String newName) {
+		Assert.isNotNull(newName);
+		this.newName = newName;
+	}
+
+	public void setUpdateReferences(boolean update) {
+		updateReferences = update;
+
+	}
+
+	public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		Assert.isNotNull(pm);
+		try {
+			String changeName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_updates");
+			TextChange[] changes = changeManager.getAllChanges();
+			// System.out.println("all changes(" + getChangeManager() + ")" +
+			// changes.length);
+			// System.out.println("add cus " +
+			// changeManager.getAllCompilationUnits().length);
+			Comparator c = new Comparator() {
+				public int compare(Object o1, Object o2) {
+					TextFileChange c1 = (TextFileChange) o1;
+					TextFileChange c2 = (TextFileChange) o2;
+					return Collator.getInstance().compare(c1.getFile().getFullPath(), c2.getFile().getFullPath());
+				}
+			};
+			if (changes.length > 0) {
+				// Arrays.sort(changes, c);
+				CompositeChange compositeChange = new CompositeChange("!" + changeName, changes);
+				compositeChange.markAsSynthetic();
+				return compositeChange;
+			}
+			else {
+				return null;
+			}
+
+		}
+		finally {
+			pm.done();
+		}
+	}
+
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java
new file mode 100644
index 0000000..f0a326e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package  org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.ParticipantManager;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+
+public class RenameResourceProcessor extends RenameProcessor implements INameUpdating {
+
+	private IResource fResource;
+	private String fNewElementName;
+		
+	public static final String IDENTIFIER= "org.eclipse.wst.ui.xsd.renameResourceProcessor"; //$NON-NLS-1$
+	
+	public RenameResourceProcessor(IResource resource) {
+		fResource= resource;
+		if (fResource != null) {
+			setNewElementName(fResource.getName());
+		}
+	}
+
+	//---- INameUpdating ---------------------------------------------------
+	
+	public void setNewElementName(String newName) {
+		Assert.isNotNull(newName);
+		fNewElementName= newName;
+	}
+
+	public String getNewElementName() {
+		return fNewElementName;
+	}
+	
+	//---- IRenameProcessor methods ---------------------------------------
+		
+	public String getIdentifier() {
+		return IDENTIFIER;
+	}
+	
+	public boolean isApplicable()  {
+		if (fResource == null)
+			return false;
+		if (! fResource.exists())
+			return false;
+		if (! fResource.isAccessible())	
+			return false;
+		return true;			
+	}
+	
+	public String getProcessorName() {
+		String message= RefactoringMessages.getFormattedString("RenameResourceProcessor.name", //$NON-NLS-1$
+				new String[]{getCurrentElementName(), getNewElementName()});
+		return message;
+	}
+	
+	public Object[] getElements() {
+		return new Object[] {fResource};
+	}
+	
+	public String getCurrentElementName() {
+		return fResource.getName();
+	}
+	
+	public String[] getAffectedProjectNatures() throws CoreException {
+		return new String[0];
+	}
+
+	public Object getNewElement() {
+		
+			
+		return ResourcesPlugin.getWorkspace().getRoot().findMember(createNewPath(getNewElementName()));
+	}
+
+	public boolean getUpdateReferences() {
+		return true;
+	}
+	
+	public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
+		Object[] elements= getElements();
+		String[] natures= getAffectedProjectNatures();
+		List result= new ArrayList();
+		RenameArguments arguments= new RenameArguments(getNewElementName(), getUpdateReferences());
+		for (int i= 0; i < elements.length; i++) {
+			result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, 
+				this, elements[i],
+				arguments, natures, shared)));
+		}
+		return (RefactoringParticipant[])result.toArray(new RefactoringParticipant[result.size()]);
+	}
+	
+	//--- Condition checking --------------------------------------------
+
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException {
+		return new RefactoringStatus();
+	}
+	
+	/* non java-doc
+	 * @see IRenameRefactoring#checkNewName()
+	 */
+	public RefactoringStatus checkNewElementName(String newName)  {
+		Assert.isNotNull(newName, "new name"); //$NON-NLS-1$
+		IContainer c= fResource.getParent();
+		if (c == null)
+			return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.getString("RenameResourceRefactoring.Internal_Error")); //$NON-NLS-1$
+						
+		if (c.findMember(newName) != null)
+			return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.getString("RenameResourceRefactoring.alread_exists")); //$NON-NLS-1$
+			
+		if (!c.getFullPath().isValidSegment(newName))
+			return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.getString("RenameResourceRefactoring.invalidName")); //$NON-NLS-1$
+	
+		RefactoringStatus result= RefactoringStatus.create(c.getWorkspace().validateName(newName, fResource.getType()));
+		if (! result.hasFatalError())
+			result.merge(RefactoringStatus.create(c.getWorkspace().validatePath(createNewPath(newName), fResource.getType())));		
+		return result;		
+	}
+	
+	/* non java-doc
+	 * @see Refactoring#checkInput(IProgressMonitor)
+	 */
+	public RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext context)  {
+		pm.beginTask("", 1); //$NON-NLS-1$
+		try{
+			return new RefactoringStatus();
+		} finally{
+			pm.done();
+		}	
+	}
+
+	private String createNewPath(String newName){
+		return fResource.getFullPath().removeLastSegments(1).append(newName).toString();
+	}
+		
+	//--- changes 
+	
+	/* non java-doc 
+	 * @see IRefactoring#createChange(IProgressMonitor)
+	 */
+	public Change createChange(IProgressMonitor pm) {
+		pm.beginTask("", 1); //$NON-NLS-1$
+		try{
+			return new ResourceRenameChange(fResource, getNewElementName());
+		} finally{
+			pm.done();
+		}	
+	}
+}
+
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java
new file mode 100644
index 0000000..03fe81e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java
@@ -0,0 +1,418 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.ParticipantManager;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.IReferenceUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringComponent;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.TextChangeManager;
+import org.eclipse.xsd.XSDSchema;
+
+
+public class RenameTargetNamespaceProcessor extends RenameProcessor implements INameUpdating, IReferenceUpdating
+{
+	private String newNamespace;
+	private boolean updateReferences = true;
+	private TextChangeManager changeManager;
+	private XSDSchema model;
+
+
+	public static final String IDENTIFIER = "org.eclipse.wst.ui.xsd.renameComponentProcessor"; //$NON-NLS-1$
+
+	public RenameTargetNamespaceProcessor(XSDSchema model, String newName)
+	{
+		this.model = model;
+		this.newNamespace = newName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#canEnableTextUpdating()
+	 */
+	public boolean canEnableTextUpdating()
+	{
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#getCurrentElementName()
+	 */
+	public String getCurrentElementName()
+	{
+		//
+		return model.getTargetNamespace();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.xsd.internal.refactoring.rename.XSDRenameProcessor#getAffectedProjectNatures()
+	 */
+	protected String[] getAffectedProjectNatures() throws CoreException
+	{
+		// TODO: find project natures of the files that are going to be
+		// refactored
+		return new String[]{"org.eclipse.jdt.core.javanature"};
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.xsd.internal.refactoring.rename.XSDRenameProcessor#loadDerivedParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus,
+	 *      java.util.List, java.lang.String[],
+	 *      org.eclipse.ltk.core.refactoring.participants.SharableParticipants)
+	 */
+	protected void loadDerivedParticipants(RefactoringStatus status,
+			List result, String[] natures, SharableParticipants shared)
+			throws CoreException
+	{
+		String newCUName= getNewElementName(); //$NON-NLS-1$
+		RenameArguments arguments= new RenameArguments(newCUName, getUpdateReferences());
+		loadDerivedParticipants(status, result, 
+			computeDerivedElements(), arguments, 
+			 natures, shared);
+	}
+	
+	protected void loadDerivedParticipants(RefactoringStatus status, List result, Object[] derivedElements, 
+			RenameArguments arguments,  String[] natures, SharableParticipants shared) throws CoreException {
+		if (derivedElements != null) {
+			for (int i= 0; i < derivedElements.length; i++) {
+				RenameParticipant[] participants= ParticipantManager.loadRenameParticipants(status, 
+					this, derivedElements[i], 
+					arguments, natures, shared);
+				result.addAll(Arrays.asList(participants));
+			}
+		}
+		
+	}
+	
+	private Object[] computeDerivedElements() {
+
+		Object[] elements = getElements();
+		Object[] results = new Object[elements.length];
+		for(int i=0; i< elements.length; i++){
+			RefactoringComponent component = (RefactoringComponent)elements[i];
+			results[i] = component.getModelObject();
+			
+		}
+		return results;
+		
+	}
+	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
+	 */
+	public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
+			CheckConditionsContext context) throws CoreException,
+			OperationCanceledException
+	{
+		try
+		{
+			RefactoringStatus result = new RefactoringStatus();
+			pm.beginTask("", 9); //$NON-NLS-1$
+			changeManager = createChangeManager(new SubProgressMonitor(pm, 1),
+					result);
+			return result;
+		} finally
+		{
+			pm.done();
+		}
+		
+
+	}
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
+			throws CoreException, OperationCanceledException
+	{
+		// TODO add code to check initial conditions for component rename
+		return new RefactoringStatus();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public Change createChange(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException
+	{
+		try
+		{
+			String changeName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_updates");
+			return new CompositeChange(changeName, changeManager.getAllChanges());
+		} finally
+		{
+			pm.done();
+		}
+
+		// Change[] changes = ComponentRenameChange.createChangesFor(
+		// this.fNamedComponent, getNewElementName());
+		//
+		// if (changes.length > 0)
+		// {
+		// CompositeChange multiChange = null;
+		// multiChange = new CompositeChange(
+		// "XSD component rename participant changes", changes); //$NON-NLS-1$
+		// TODO: externalize string
+		// return multiChange;
+		// } else
+		// {
+		//
+		// return new ComponentRenameChange(
+		// fNamedComponent,
+		// fNamedComponent.getName(),
+		// getNewElementName(),
+		// fNamedComponent.getSchema());
+		// }
+		
+		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
+	 */
+	public Object[] getElements()
+	{
+		return new Object[] { model };
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getIdentifier()
+	 */
+	public String getIdentifier()
+	{
+		return IDENTIFIER;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getProcessorName()
+	 */
+	public String getProcessorName()
+	{
+		return RefactoringMessages.getFormattedString(
+				"RenameComponentRefactoring.name", //$NON-NLS-1$
+				new String[]
+				{
+						getCurrentElementName(),
+						getNewElementName() });
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#isApplicable()
+	 */
+	public boolean isApplicable() throws CoreException
+	{
+		if (getModel() == null)
+			return false;
+		// TODO implement isApplicable logic for the named component,
+		// verify how it is different from other condition checks
+		// if (fNamedComponent.isAnonymous())
+		// return false;
+		// if (! Checks.isAvailable(fType))
+		// return false;
+		// if (isSpecialCase(fType))
+		// return false;
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.INameUpdating#checkNewElementName(java.lang.String)
+	 */
+	public RefactoringStatus checkNewElementName(String newName)
+	{
+		Assert.isNotNull(newName, "new name"); //$NON-NLS-1$
+		// TODO: implement new name checking
+		// RefactoringStatus result = Checks.checkTypeName(newName);
+		// if (Checks.isAlreadyNamed(fType, newName))
+		// result.addFatalError(RefactoringCoreMessages.getString("RenameTypeRefactoring.choose_another_name"));
+		// //$NON-NLS-1$
+		return new RefactoringStatus();
+	}
+
+	public final RefactoringParticipant[] loadParticipants(
+			RefactoringStatus status, SharableParticipants sharedParticipants)
+			throws CoreException
+	{
+		RenameArguments arguments = new RenameArguments(getNewElementName(),
+				true);
+		String[] natures = getAffectedProjectNatures();
+		List result = new ArrayList();
+		loadElementParticipants(status, result, arguments, natures,
+				sharedParticipants);
+		loadDerivedParticipants(status, result, natures, sharedParticipants);
+		return (RefactoringParticipant[]) result
+				.toArray(new RefactoringParticipant[result.size()]);
+	}
+
+	protected void loadElementParticipants(RefactoringStatus status,
+			List result, RenameArguments arguments, String[] natures,
+			SharableParticipants shared) throws CoreException
+	{
+		Object[] elements = getElements();
+		for (int i = 0; i < elements.length; i++)
+		{
+			result.addAll(Arrays.asList(ParticipantManager
+					.loadRenameParticipants(status, this, elements[i],
+							arguments, natures, shared)));
+		}
+	}
+	
+	private TextChangeManager createChangeManager(IProgressMonitor pm,
+			RefactoringStatus status) throws CoreException
+	{
+		TextChangeManager manager = new TextChangeManager(false);
+		// only one declaration gets updated
+		addDeclarationUpdate(manager);
+		return manager;
+	}
+
+	private void addDeclarationUpdate(TextChangeManager manager)
+
+	{
+		String fileStr = getModel().getSchemaLocation();
+		URI uri = URI.createPlatformResourceURI(fileStr);
+		try
+		{
+			URL url = new URL(uri.toString());
+			url = Platform.resolve(url);
+			if(url != null){
+				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+				IFile file = root.getFileForLocation(new Path(url.getFile()));
+				if(file != null ){
+					TextChange change = manager.get(file);
+					addDeclarationUpdate(change);
+				}
+			}
+		} catch (MalformedURLException e)
+		{
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e)
+		{
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		
+	}
+	
+	
+
+	final void addDeclarationUpdate(TextChange change) 
+	{
+//		String editName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_declatation");;
+//	  
+//		NamedComponentRenamer renamer = new NamedComponentRenamer(
+//				selectedComponent.getElement(), newNamespace);
+//		renamer.renameComponent();
+//		List textEdits = renamer.getTextEdits();
+//		for (int j = 0; j < textEdits.size(); j++)
+//		{
+//			ReplaceEdit replaceEdit = (ReplaceEdit) textEdits
+//					.get(j);
+//			TextChangeCompatibility.addTextEdit(change,
+//					editName, replaceEdit);
+//		}
+	}
+
+	public void setNewElementName(String newName)
+	{
+		this.newNamespace = newName;
+	}
+
+	public String getNewElementName()
+	{
+		return newNamespace;
+	}
+
+	
+
+	public boolean canEnableUpdateReferences()
+	{
+		return true;
+	}
+
+	public boolean getUpdateReferences()
+	{
+		return updateReferences;
+	}
+
+	public void setUpdateReferences(boolean update)
+	{
+		updateReferences = update;
+		
+	}
+
+	public final TextChangeManager getChangeManager()
+	{
+		return changeManager;
+	}
+
+	public final XSDSchema getModel()
+	{
+		return model;
+	}
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameChange.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameChange.java
new file mode 100644
index 0000000..ed6650c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameChange.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+
+/**
+ * Represents a change that renames a given resource
+ */
+public class ResourceRenameChange extends Change {
+
+	/*
+	 * we cannot use handles because they became invalid when you rename the resource.
+	 * paths do not.
+	 */
+	private IPath fResourcePath;
+
+	private String fNewName;
+
+	/**
+	 * @param newName includes the extension
+	 */
+	public ResourceRenameChange(IResource resource, String newName) {
+		this(resource.getFullPath(), newName);
+	}
+
+	private ResourceRenameChange(IPath resourcePath, String newName) {
+		fResourcePath= resourcePath;
+		fNewName= newName;
+	}
+
+	private IResource getResource() {
+		return ResourcesPlugin.getWorkspace().getRoot().findMember(fResourcePath);
+	}
+
+	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
+		
+		// TODO: implement file validation, see JDTChange
+		return new RefactoringStatus();
+	}
+	
+	/*
+	 * to avoid the exception senders should check if a resource with the new name
+	 * already exists
+	 */
+	public Change perform(IProgressMonitor pm) throws CoreException {
+		try {
+			if (false)
+				throw new NullPointerException();
+			pm.beginTask(RefactoringMessages.getString("XSDRenameResourceChange.rename_resource"), 1); //$NON-NLS-1$
+
+			getResource().move(renamedResourcePath(fResourcePath, fNewName), getCoreRenameFlags(), pm);
+
+			String oldName= fResourcePath.lastSegment();
+			IPath newPath= renamedResourcePath(fResourcePath, fNewName);
+			return new ResourceRenameChange(newPath, oldName);
+		} finally {
+			pm.done();
+		}
+	}
+
+	private int getCoreRenameFlags() {
+		if (getResource().isLinked())
+			return IResource.SHALLOW;
+		else
+			return IResource.NONE;
+	}
+
+	/*
+	 * changes resource names /s/p/A.java renamed to B.java becomes /s/p/B.java
+	 */
+	public static IPath renamedResourcePath(IPath path, String newName) {
+		return path.removeLastSegments(1).append(newName);
+	}
+
+	public String getName() {
+		return RefactoringMessages.getFormattedString(
+			"XSDRenameResourceChange.name", new String[]{fResourcePath.toString(), //$NON-NLS-1$
+			renamedResourcePath(fResourcePath, fNewName).toString()});
+	}
+
+	public Object getModifiedElement() {
+		return getResource();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void initializeValidationData(IProgressMonitor pm) {
+		// TODO Auto-generated method stub
+
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameParticipant.java
new file mode 100644
index 0000000..78c9932
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameParticipant.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.TextChangeManager;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDSchema;
+
+/**
+ * This rename participant creates text changes for the references of the XSD and WSDL files
+ */
+public class ResourceRenameParticipant extends RenameParticipant {
+	
+	private IFile file = null;
+	private TextChangeManager changeManager;
+
+	
+	private static String XSD_CONTENT_TYPE_ID = "org.eclipse.wst.xsd.core.xsdsource";
+	private static String WSDL_CONTENT_TYPE_ID = "org.eclipse.wst.wsdl.wsdlsource";
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
+	 */
+	protected boolean initialize(Object element) {
+		if(element instanceof IFile) {
+			// check if file has XSD or WSDL content
+			IFile aFile = (IFile) element;
+			try {
+				IContentDescription description = aFile.getContentDescription();
+				IContentType contentType = description.getContentType();
+				if(contentType != null){
+					if(XSD_CONTENT_TYPE_ID.equals(contentType.getId()) ||
+							WSDL_CONTENT_TYPE_ID.equals(contentType.getId())){
+						file = aFile;
+						return true;
+					}
+				}
+			} catch (CoreException e) {
+				return false;
+			}
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
+	 */
+	public String getName() {
+		return RefactoringMessages.getString("ResourceRenameParticipant.compositeChangeName");
+	}
+	
+	private IPath getNewFilePath() {
+		
+		IPath oldPath = file.getRawLocation();
+		IPath newPath = oldPath.removeLastSegments(1).append(getArguments().getNewName());
+		return newPath;
+	}
+
+	public RefactoringStatus checkConditions(IProgressMonitor pm,
+			CheckConditionsContext context) throws OperationCanceledException
+	{
+		RefactoringStatus result = new RefactoringStatus();
+		try
+		{
+			pm.beginTask("", 9); //$NON-NLS-1$
+			changeManager = createChangeManager(new SubProgressMonitor(pm, 1),
+					result);
+			
+		} catch(CoreException e){
+			result.addFatalError(e.toString());
+		}
+		finally
+		{
+			pm.done();
+		}
+		return result;
+
+	}
+	
+	
+
+	public Change createChange(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException
+	{
+		try
+		{
+			String changeName = RefactoringMessages.getString("RenameResourceChange.rename_resource_reference_change");
+			TextChange[] changes =  changeManager.getAllChanges();
+			if(changes.length > 0){
+				return new CompositeChange(changeName, changes);
+			}
+			else{
+				return null;
+			}
+			
+		} finally
+		{
+			pm.done();
+		}
+
+	}
+	
+	
+	private TextChangeManager createChangeManager(IProgressMonitor pm,
+			RefactoringStatus status) throws CoreException
+	{
+		TextChangeManager manager = new TextChangeManager(false);
+		// only one declaration gets updated
+		//addDeclarationUpdate(manager);
+		if (getArguments().getUpdateReferences())
+			addOccurrences(manager, pm, status);
+		return manager;
+	}
+
+
+
+	void addOccurrences(TextChangeManager manager, IProgressMonitor pm,
+			RefactoringStatus status) throws CoreException
+	{
+//		
+//		Object[] occurrences = SearchTools.getFileDependencies(file);
+//		pm.beginTask("", occurrences.length); //$NON-NLS-1$
+//		
+//		for (int i = 0; i < occurrences.length; i++)
+//		{
+//			Object object = occurrences[i];
+//
+//			if (object instanceof SearchResultGroup)
+//			{
+//				SearchResultGroup searchResult = (SearchResultGroup) object;
+//				if (searchResult == null)
+//					continue;
+//				
+//				IFile referencingFile = (IFile)searchResult.getResource();
+//					
+//				resourceSet = new ResourceSetImpl();
+//				// for each result file create XSD model and get component from that model
+//				resourceSet.getAdapterFactories().add(
+//						new XSDSchemaLocationResolverAdapterFactory());
+//				URI uri = URI.createFileURI(referencingFile.getLocation().toPortableString());
+//				try
+//				{
+//					XSDSchema schema = XSDFactory.eINSTANCE.createXSDSchema();
+//					IStructuredModel structuredModel = StructuredModelManager.getModelManager().getModelForRead(referencingFile);
+//					IDOMModel domModel = (IDOMModel) structuredModel;
+//					Resource resource = new XSDResourceImpl();
+//					resource.setURI(uri);
+//					schema = XSDFactory.eINSTANCE.createXSDSchema();
+//					resource.getContents().add(schema);
+//					resourceSet.getResources().add(resource);
+//					schema.setElement(domModel.getDocument().getDocumentElement());
+//					// get target namespace 
+//					String stringPath = file.getLocation().toString();
+//					String targetNamespace = XMLQuickScan.getTargetNamespace(stringPath);
+//					targetNamespace = targetNamespace == null ? "" : targetNamespace;
+//
+//					List textEdits = new ArrayList();
+//					SearchMatch[] matches = searchResult.getSearchResults();
+//					
+//					for (int j = 0; j < matches.length; j++) {
+//						SearchMatch match = matches[j];
+//						
+//						FileReferenceRenamer renamer = new FileReferenceRenamer(
+//								match.getAttrValue(), targetNamespace, getNewFilePath().toString(), schema);
+//						renamer.visitSchema(schema);
+//					    textEdits.addAll(renamer.getTextEdits());
+//					}
+//					
+//					
+//					if(!textEdits.isEmpty()){
+//						TextChange textChange = manager.get(referencingFile);
+//						for (int j = 0; j < textEdits.size(); j++)
+//						{
+//							ReplaceEdit replaceEdit = (ReplaceEdit) textEdits
+//									.get(j);
+//							String editName = RefactoringMessages.getString("ResourceRenameParticipant.File_Rename_update_reference");
+//							TextChangeCompatibility.addTextEdit(textChange,
+//									editName, replaceEdit);
+//						}
+//					}
+//					
+//				} catch (Exception e)
+//				{
+//					e.printStackTrace();
+//				} finally
+//				{
+//
+//				}
+//			}
+//		}
+	}
+	
+	
+	public  class ReferenceLocationFinder
+	{
+		protected XSDNamedComponent component;
+		protected String name;
+		protected XSDSchema referencingSchema;
+		protected List results = new ArrayList();
+
+		public ReferenceLocationFinder(XSDNamedComponent component,
+				String name, XSDSchema referencingSchema)
+		{
+			this.component = component;
+			this.name = name;
+			this.referencingSchema = referencingSchema;
+		}
+
+		public void run()
+		{
+			
+			//XSDSwitch xsdSwitch = new XSDSwitch()
+//			{
+//				public Object caseXSDTypeDefinition(XSDTypeDefinition object)
+//				{
+//					GlobalTypeReferenceRenamer renamer = new GlobalTypeReferenceRenamer(
+//							object.getName(), object.getTargetNamespace(), name, referencingSchema);
+//					renamer.visitSchema(referencingSchema);
+//					results.addAll(renamer.getTextEdits());
+//					return null;
+//				}
+//
+//				public Object caseXSDElementDeclaration(
+//						XSDElementDeclaration object)
+//				{
+//					if (object.isGlobal())
+//					{
+//						GlobalElementRenamer renamer = new GlobalElementRenamer(
+//								object.getName(), object.getTargetNamespace(), name, referencingSchema);
+//						renamer.visitSchema(referencingSchema);
+//						results.addAll(renamer.getTextEdits());
+//					}
+//					return null;
+//				}
+//
+//				public Object caseXSDModelGroupDefinition(
+//						XSDModelGroupDefinition object)
+//				{
+//					GlobalGroupRenamer renamer = new GlobalGroupRenamer(
+//							object.getName(), object.getTargetNamespace(), name, referencingSchema);
+//					renamer.visitSchema(referencingSchema);
+//					return null;
+//				}
+//			};
+			//xsdSwitch.doSwitch(component);
+//			component.setName(name);
+//			try
+//			{
+//				referencingSchema.eResource().save(new HashMap());
+//			} catch (IOException e)
+//			{
+//				e.printStackTrace();
+//			}
+
+		}
+
+		public final List getResults()
+		{
+			return results;
+		}
+	}
+	
+	
+
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java
new file mode 100644
index 0000000..25179e7
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java
@@ -0,0 +1,76 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.core.search.SearchMatch;
+import org.eclipse.wst.common.core.search.SearchRequestor;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class SortingSearchRequestor extends SearchRequestor {
+	
+	public static String NONAMESPACE = "nonamespace";
+
+	
+		private Map fFound;
+
+		public SortingSearchRequestor() {
+			fFound= new HashMap();
+		}
+		
+
+		
+		/**
+		 * @return a List of {@link SearchMatch}es (sorted by namespace)
+		 */
+		public Map/* namespace - <SearchMatch>*/ getResults() {
+			return fFound;
+		}
+
+
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.wst.common.core.search.internal.provisional.SearchRequestor#acceptSearchMatch(org.eclipse.wst.common.search.internal.provisional.SearchMatch)
+		 */
+		public void acceptSearchMatch(SearchMatch match) throws CoreException {
+
+			
+			if(match != null && match.getObject() instanceof Node){
+				Node node = (Node)match.getObject();
+				Element domElement = null;
+				switch (node.getNodeType()) {
+				case Node.ATTRIBUTE_NODE:
+					domElement = ((Attr)node).getOwnerElement();
+					break;
+				case Node.ELEMENT_NODE:
+					domElement = ((Element)node);
+					break;
+				default:
+					break;
+				}
+				String namespace = domElement.getNamespaceURI();
+				if(namespace == null || namespace.equals("")){
+					namespace = NONAMESPACE;
+				}
+				List matches = getMatches(namespace);
+				matches.add(match);			
+			}
+			
+		}
+		
+		private List getMatches(String namespace){
+			Object matches = fFound.get(namespace);
+			if(!(matches instanceof List)){
+				matches = new ArrayList();
+				fFound.put(namespace, matches);
+			}
+			return (List)matches;
+			
+		}
+		
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java
new file mode 100644
index 0000000..cce160c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java
@@ -0,0 +1,129 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.wst.common.core.search.SearchMatch;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.wst.xsd.ui.internal.refactor.TextChangeManager;
+import org.eclipse.wst.xsd.ui.internal.refactor.util.TextChangeCompatibility;
+import org.eclipse.xsd.util.XSDConstants;
+import org.w3c.dom.Node;
+
+public class XMLComponentRenameParticipant extends RenameParticipant {
+	
+	protected SearchMatch match;
+
+	protected TextChangeManager changeManager;
+	protected List matches;
+
+    
+    
+	protected boolean initialize(Object element) {
+		
+		if(getArguments() instanceof ComponentRenameArguments){
+			// changeManger is passed in from the RenameComponentProcessor to collect all the changes
+			changeManager = ((ComponentRenameArguments)getArguments()).getChangeManager();
+		}
+		
+		return false;
+	}
+	
+	public String getName() {
+		return "XML Component Rename Participant";
+	}
+
+	public RefactoringStatus checkConditions(IProgressMonitor monitor,
+			CheckConditionsContext context) throws OperationCanceledException {
+		return null;
+	}
+	
+	public TextChangeManager getChangeManager(){
+		
+		if(changeManager == null){
+				changeManager = new TextChangeManager(false);
+		}
+		return changeManager;
+		
+	}
+	
+	private RefactoringStatus createRenameChanges(final IProgressMonitor monitor) throws CoreException {
+		Assert.isNotNull(monitor);
+		final RefactoringStatus status= new RefactoringStatus();
+		try {
+			monitor.beginTask("RefactoringMessages.RenameComponentRefactoring_searching", 1); 
+			createRenameChanges(new SubProgressMonitor(monitor, 1));
+			//updateChangeManager(new SubProgressMonitor(monitor, 1), status);
+		} finally {
+			monitor.done();
+		}
+		return status;
+	}
+
+	public Change createChange(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException {
+		//System.out.println("createChange("  + getChangeManager() + ")" + matches.size());
+		for (Iterator iter = matches.iterator(); iter.hasNext();) {
+			SearchMatch match = (SearchMatch) iter.next();
+			TextChange textChange = getChangeManager().get(match.getFile());
+			String newName = getArguments().getNewName();
+			String qualifier = "";
+			if(getArguments() instanceof ComponentRenameArguments){
+				qualifier = ((ComponentRenameArguments)getArguments()).getQualifier();
+			}
+			if(match.getObject() instanceof Node){
+				Node node = (Node)match.getObject();
+				if(node instanceof IDOMAttr){
+					IDOMAttr attr = (IDOMAttr)node;
+					IDOMElement element = (IDOMElement)attr.getOwnerElement() ;
+					newName = getNewQName(element, qualifier, newName);
+				}
+				newName = RenameComponentProcessor.quoteString(newName);
+			}
+			
+			ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), match.getLength(), newName );
+			String editName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_reference");
+          //  System.out.println("textChange " + textChange + "/ replaceEdit " + replaceEdit);
+			TextChangeCompatibility.addTextEdit(textChange, editName, replaceEdit);
+   		}
+		// don't create any change now, all the changes are in changeManger variable and will be combined in RenameComponentProcessor.postCreateChange method
+		return null;
+	}
+	
+	private static String getNewQName(Node node, String targetNamespace, String newName) {
+		StringBuffer sb = new StringBuffer();
+		if (newName != null) {
+			String prefix = XSDConstants.lookupQualifier(node, targetNamespace);
+			if (prefix != null && prefix.length() > 0) {
+				sb.append(prefix);
+				sb.append(":");
+				sb.append(newName);
+			} else {
+				sb.append(newName);
+			}
+		} else {
+			sb.append(newName);
+		}
+
+		return sb.toString();
+	}
+
+  public void setChangeManager(TextChangeManager changeManager)
+  {
+    this.changeManager = changeManager;
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java
new file mode 100644
index 0000000..c61fc01
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java
@@ -0,0 +1,32 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.List;
+import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
+import org.eclipse.xsd.XSDNamedComponent;
+
+/**
+ * This participant takes case of renaming matches that are XSD components
+ */
+public class XSDComponentRenameParticipant extends XMLComponentRenameParticipant {
+
+protected boolean initialize(Object element) {
+		super.initialize(element);
+		if(element instanceof XSDNamedComponent){
+			if(getArguments() instanceof ComponentRenameArguments){
+				matches = (List)((ComponentRenameArguments)getArguments()).getMatches().get(IXSDSearchConstants.XMLSCHEMA_NAMESPACE);
+			}
+			if(matches != null){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public String getName() {
+		
+		return "XSD component rename participant";
+	}
+
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java
new file mode 100644
index 0000000..3972831
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.structure;
+
+import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.w3c.dom.Element;
+
+public abstract class AbstractCommand 
+{
+  private XSDConcreteComponent parent;
+  private XSDConcreteComponent model;
+
+  protected AbstractCommand(XSDConcreteComponent parent)
+  {
+    this.parent = parent;
+  }
+  
+  public abstract void run();
+
+  protected XSDConcreteComponent getParent()
+  {
+    return parent;
+  }
+  
+  public XSDConcreteComponent getModelObject()
+  {
+    return model;
+  }
+  
+  protected void setModelObject(XSDConcreteComponent model)
+  {
+    this.model = model;
+  }
+  
+  // Establish part-whole relationship
+  protected abstract boolean adopt(XSDConcreteComponent model);
+
+  protected void formatChild(Element child)
+  {
+    if (child instanceof IDOMNode)
+    {
+      IDOMModel model = ((IDOMNode)child).getModel();
+      try
+      {
+        // tell the model that we are about to make a big model change
+        model.aboutToChangeModel();
+        
+        IStructuredFormatProcessor formatProcessor = new FormatProcessorXML();
+        formatProcessor.formatNode(child);
+      }
+      finally
+      {
+        // tell the model that we are done with the big model change
+        model.changedModel(); 
+      }
+    }
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeAnonymousTypeGlobalCommand.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeAnonymousTypeGlobalCommand.java
new file mode 100644
index 0000000..95f96a4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeAnonymousTypeGlobalCommand.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.structure;
+
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+public final class MakeAnonymousTypeGlobalCommand extends AbstractCommand {
+
+	String fNewName;
+
+	public MakeAnonymousTypeGlobalCommand(XSDConcreteComponent element,
+			String newName) {
+		super(element.getContainer());
+		setModelObject(element);
+		fNewName = newName;
+	}
+
+	public void run() {
+		XSDConcreteComponent model = getModelObject();
+		XSDConcreteComponent parent = model.getContainer();
+		XSDTypeDefinition globalTypeDef = null;
+		if (model instanceof XSDComplexTypeDefinition) {
+			if (parent instanceof XSDElementDeclaration) {
+				// clone typedef with it's content and set it global
+				globalTypeDef = (XSDComplexTypeDefinition) model
+						.cloneConcreteComponent(true, false);
+				globalTypeDef.setName(fNewName);
+				parent.getSchema().getContents().add(globalTypeDef);
+				((XSDElementDeclaration) parent)
+						.setTypeDefinition(globalTypeDef);
+			}
+		} else if (model instanceof XSDSimpleTypeDefinition) {
+
+			XSDSimpleTypeDefinition typeDef = (XSDSimpleTypeDefinition) model;
+			if (parent instanceof XSDElementDeclaration) {
+				// clone typedef with it's content and set it global
+				globalTypeDef = (XSDSimpleTypeDefinition) typeDef
+						.cloneConcreteComponent(true, false);
+				globalTypeDef.setName(fNewName);
+				parent.getSchema().getContents().add(globalTypeDef);
+				((XSDElementDeclaration) parent)
+						.setTypeDefinition(globalTypeDef);
+				formatChild(globalTypeDef.getElement());
+
+			} else if (parent instanceof XSDAttributeDeclaration) {
+				// clone typedef with it's content and set it global
+				globalTypeDef = (XSDSimpleTypeDefinition) typeDef
+						.cloneConcreteComponent(true, false);
+				globalTypeDef.setName(fNewName);
+				parent.getSchema().getContents().add(globalTypeDef);
+				((XSDAttributeDeclaration) parent)
+						.setTypeDefinition((XSDSimpleTypeDefinition) globalTypeDef);
+
+			}
+
+		}
+
+		formatChild(globalTypeDef.getElement());
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.xsd.ui.internal.commands.AbstractCommand#adopt(org.eclipse.xsd.XSDConcreteComponent)
+	 */
+	protected boolean adopt(XSDConcreteComponent model) {
+		// TODO Auto-generated method stub
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeLocalElementGlobalCommand.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeLocalElementGlobalCommand.java
new file mode 100644
index 0000000..28bc4ac
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeLocalElementGlobalCommand.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.structure;
+
+import org.eclipse.xsd.XSDComplexTypeContent;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDFactory;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+public final class MakeLocalElementGlobalCommand extends AbstractCommand
+{
+	
+  public MakeLocalElementGlobalCommand
+    (XSDConcreteComponent element)
+  {
+    super(element.getContainer());
+    setModelObject(element);
+  }
+  
+  public void run()
+  {
+    
+   if(getModelObject() instanceof XSDElementDeclaration){
+   
+	   XSDElementDeclaration element = (XSDElementDeclaration)getModelObject();
+ 	XSDConcreteComponent parent = getParent();
+ 	XSDConcreteComponent container = parent.getContainer();
+ 	
+ 	// clone element with it's content and set it global
+	XSDConcreteComponent  elementDecl = ((XSDElementDeclaration)getModelObject()).cloneConcreteComponent(true, true);
+ 	container.getSchema().getContents().add(elementDecl);
+ 	
+ 	// create local element and set it's reference to the global one
+ 	XSDElementDeclaration elementRef = 
+	      XSDFactory.eINSTANCE.createXSDElementDeclaration();
+	elementRef.setValue(element.getValue());
+    elementRef.setResolvedElementDeclaration((XSDElementDeclaration)elementDecl); 
+    
+    // now set content models
+ 	if(parent instanceof XSDComplexTypeContent){
+ 		if(container instanceof XSDModelGroup){
+ 			XSDModelGroup modelGroup = (XSDModelGroup)container;
+ 			// disconnect parent from its container
+ 			int index = modelGroup.getContents().indexOf(parent);
+ 			 XSDParticle particle = 
+ 			      XSDFactory.eINSTANCE.createXSDParticle();
+ 		    particle.setContent(elementRef);
+ 		    modelGroup.getContents().add(index, particle); 
+ 		   
+ 			modelGroup.getContents().remove(parent);
+ 		    modelGroup.updateElement(true);
+  		    formatChild(modelGroup.getElement());
+ 		}
+ 	}
+ 	else if(parent instanceof XSDTypeDefinition){
+		System.out.println("MakeLocalElementGlobalCommand.run: parent instanceof XSDTypeDefinition");
+		 		
+ 	}
+ 	
+ 	container.getSchema().updateElement(true);
+    formatChild(elementDecl.getElement());
+  
+   }
+
+  }
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.xsd.ui.internal.commands.AbstractCommand#adopt(org.eclipse.xsd.XSDConcreteComponent)
+	 */
+	protected boolean adopt(XSDConcreteComponent model) {
+		// TODO Auto-generated method stub
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalChange.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalChange.java
new file mode 100644
index 0000000..b737c45
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalChange.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.xsd.ui.internal.refactor.structure;
+
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+/**
+ * @author ebelisar
+ * 
+ */
+public class MakeTypeGlobalChange extends Change {
+
+	private Map fChanges;
+
+	private String fNewName;
+
+	private XSDTypeDefinition fTypeComponent;
+
+	public MakeTypeGlobalChange(XSDTypeDefinition component, 
+			String newName) {
+		Assert.isNotNull(newName, "new name"); //$NON-NLS-1$
+
+		fTypeComponent = component;
+		fNewName = newName;
+	}
+
+	// public static Change[] createChangesFor(XSDNamedComponent component,
+	// String newName) {
+	// // TODO: P1 implement search of XSD files
+	// XSDSearchSupport support = XSDSearchSupport.getInstance();
+	// RefactorSearchRequestor requestor = new
+	// RefactorSearchRequestor(component, newName);
+	// support.searchRunnable(component, IXSDSearchConstants.WORKSPACE_SCOPE,
+	// requestor);
+	//
+	// return requestor.getChanges();
+	//
+	// }
+
+	protected Change createUndoChange() {
+		return new MakeTypeGlobalChange(fTypeComponent, getNewName());
+	}
+
+	protected void doRename(IProgressMonitor pm) throws CoreException {
+		// TODO P1 change temporary rename of XSD model components
+		performModify(getNewName());
+	}
+
+	public void performModify(final String value) {
+			DelayedRenameRunnable runnable = new DelayedRenameRunnable(
+					fTypeComponent, value);
+			// TODO: remove Display
+			//Display.getCurrent().asyncExec(runnable);
+	}
+
+	protected static class DelayedRenameRunnable implements Runnable {
+		protected XSDTypeDefinition component;
+
+		protected String name;
+
+		public DelayedRenameRunnable(XSDTypeDefinition component, String name) {
+			this.component = component;
+			this.name = name;
+		}
+
+		public void run() {
+			DocumentImpl doc = (DocumentImpl) component.getElement().getOwnerDocument();
+			doc.getModel().beginRecording(
+							this,
+							RefactoringMessages
+									.getString("_UI_ACTION_MAKE_ANONYMOUS_TYPE_GLOBAL"));
+			MakeAnonymousTypeGlobalCommand command = new MakeAnonymousTypeGlobalCommand(
+					component, name);
+			command.run();
+			doc.getModel().endRecording(this);
+		}
+	}
+
+	public TextChange getChange(IFile file) {
+		TextChange result = (TextChange) fChanges.get(file);
+		if (result == null) {
+			result = new TextFileChange(file.getName(), file);
+			fChanges.put(file, result);
+		}
+		return result;
+	}
+
+	public String getName() {
+		return RefactoringMessages
+				.getFormattedString(
+						"MakeTypeGlobalChange.name", new String[] {getNewName() }); //$NON-NLS-1$
+	}
+
+	public final Change perform(IProgressMonitor pm) throws CoreException {
+		try {
+			pm.beginTask(RefactoringMessages
+					.getString("XSDComponentRenameChange.Renaming"), 1); //$NON-NLS-1$
+			Change result = createUndoChange();
+			doRename(new SubProgressMonitor(pm, 1));
+			return result;
+		} finally {
+			pm.done();
+		}
+	}
+
+	/**
+	 * Gets the newName.
+	 * 
+	 * @return Returns a String
+	 */
+	protected String getNewName() {
+		return fNewName;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.Change#getModifiedElement()
+	 */
+	public Object getModifiedElement() {
+		// TODO Auto-generated method stub
+		return fTypeComponent;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void initializeValidationData(IProgressMonitor pm) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ltk.core.refactoring.Change#isValid(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException {
+		// TODO implement change validation
+		return new RefactoringStatus();
+	}
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalProcessor.java
new file mode 100644
index 0000000..28f09f2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalProcessor.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.structure;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.ParticipantManager;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+public class MakeTypeGlobalProcessor extends RenameProcessor implements INameUpdating{
+	
+	private XSDTypeDefinition fTypeComponent;
+	private String fNewElementName;
+
+	public static final String IDENTIFIER= "org.eclipse.wst.ui.xsd.makeTypeGlobalProcessor"; //$NON-NLS-1$
+
+	//private QualifiedNameSearchResult fNameSearchResult;
+	
+	public MakeTypeGlobalProcessor(XSDTypeDefinition element, String newName) {
+		fTypeComponent= element;
+		fNewElementName = newName;
+		
+	}
+	
+	public XSDTypeDefinition getTypeComponent() {
+		return fTypeComponent;
+	}
+
+	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#canEnableTextUpdating()
+	 */
+	public boolean canEnableTextUpdating() {
+		return true;
+	}
+
+	protected String[] getAffectedProjectNatures() throws CoreException {
+		//TODO: find project natures of the files that are going to be refactored
+		return new String[0];
+	}
+	
+	protected void loadDerivedParticipants(RefactoringStatus status,
+			List result, String[] natures, SharableParticipants shared)
+			throws CoreException {
+		// TODO: provide a way to load rename participants
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
+	 */
+	public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
+			CheckConditionsContext context) throws CoreException,
+			OperationCanceledException {
+		// TODO add code to check final conditions for component rename
+		return new RefactoringStatus();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
+			throws CoreException, OperationCanceledException {
+//		 TODO add code to check initial conditions for component rename
+		return new RefactoringStatus();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public Change createChange(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException {
+		// TODO P1 add change creation
+//		Change[] changes = XSDComponentRenameChange.createChangesFor(this.fNamedComponent, getNewElementName());
+//		CompositeChange multiChange = null; 
+//			if(changes.length > 0)
+//				multiChange  = new CompositeChange("XSD component rename participant changes", changes); //$NON-NLS-1$ TODO: externalize string
+//		return multiChange;
+		
+//		computeNameMatches(pm);	
+//		Change[] changes = fNameSearchResult.getAllChanges();
+//		return new CompositeChange("XSD file rename participant changes", changes); //TODO: externalize string
+		pm.beginTask("", 1); //$NON-NLS-1$
+		try{
+			return new MakeTypeGlobalChange(fTypeComponent, getNewElementName());
+		} finally{
+			pm.done();
+		}	 
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
+	 */
+	public Object[] getElements() {
+		
+		return new Object[] {fTypeComponent};
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getIdentifier()
+	 */
+	public String getIdentifier() {
+		return IDENTIFIER;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getProcessorName()
+	 */
+	public String getProcessorName() {
+		return RefactoringMessages.getFormattedString(
+				"MakeLocalTypeGlobalRefactoring.name",  //$NON-NLS-1$
+				new String[]{getNewElementName()});
+
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#isApplicable()
+	 */
+	public boolean isApplicable() throws CoreException {
+		if (fTypeComponent == null)
+			return false;
+		// TODO implement isApplicable logic for the named component, 
+		// verify how it is different from other condition checks
+//		if (fNamedComponent.isAnonymous())
+//			return false;
+//		if (! Checks.isAvailable(fType))
+//			return false;
+//		if (isSpecialCase(fType))
+//			return false;
+		return true;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.INameUpdating#checkNewElementName(java.lang.String)
+	 */
+	public RefactoringStatus checkNewElementName(String newName){
+		Assert.isNotNull(newName, "new name"); //$NON-NLS-1$
+		// TODO: implement new name checking
+//		RefactoringStatus result = Checks.checkTypeName(newName);
+//		if (Checks.isAlreadyNamed(fType, newName))
+//			result.addFatalError(RefactoringCoreMessages.getString("RenameTypeRefactoring.choose_another_name"));	 //$NON-NLS-1$
+		return new RefactoringStatus();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.corext.refactoring.tagging.INameUpdating#getNewElement()
+	 */
+	public Object getNewElement() throws CoreException {
+		// TODO implement this method, it's used for updating selection on new element
+		return null;
+	}
+	
+//	private void computeNameMatches(IProgressMonitor pm) throws CoreException {
+//	
+//	    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+//	    try {
+//			URL fileURL = Platform.resolve(new URL(fNamedComponent.getSchema().getSchemaLocation()));
+//			IFile file = workspaceRoot.getFileForLocation(new Path(fileURL.getPath()));
+//			if (fNameSearchResult == null)
+//				fNameSearchResult= new QualifiedNameSearchResult();
+//			QualifiedNameFinder.process(fNameSearchResult, getNamedComponent().getName(),  
+//				getNewElementName(), 
+//				"*.xsd", file.getProject(), pm);
+//		} catch (IOException e) {
+//			// TODO Auto-generated catch block
+//			e.printStackTrace();
+//		}
+//	}
+	
+	public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
+		RenameArguments arguments= new RenameArguments(getNewElementName(), true);
+		String[] natures= getAffectedProjectNatures();
+		List result= new ArrayList();
+		loadElementParticipants(status, result, arguments, natures, sharedParticipants);
+		loadDerivedParticipants(status, result, natures, sharedParticipants);
+		return (RefactoringParticipant[])result.toArray(new RefactoringParticipant[result.size()]);
+	}
+	
+	protected void loadElementParticipants(RefactoringStatus status, List result, RenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException {
+		Object[] elements= getElements();
+		for (int i= 0; i < elements.length; i++) {
+			result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, 
+				this,  elements[i],
+				arguments, natures, shared)));
+		}
+	}
+	
+	
+	public void setNewElementName(String newName) {
+		
+		fNewElementName= newName;
+	}
+
+	public String getNewElementName() {
+		return fNewElementName;
+	}
+
+	public String getCurrentElementName() {
+		// TODO Auto-generated method stub
+		return fNewElementName;
+	}
+	
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java
new file mode 100644
index 0000000..30274d4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java
@@ -0,0 +1,288 @@
+/*
+ * Created on Sep 21, 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
+package org.eclipse.wst.xsd.ui.internal.refactor.util;
+
+
+
+
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.wst.common.uriresolver.internal.URI;
+import org.eclipse.wst.sse.core.internal.util.PathHelper;
+
+
+/**
+ * Hyperlink manager. Proved useful services like link conversion
+ * An utility class to help other parsre modules to convert links
+ */
+public class LinkURLHelper {
+
+	private static final String FILE_PROTOCOL_SEARCH_SIG = "file:/";//$NON-NLS-1$
+	private static final String FILE_PROTOCOL_SIG = "file:///";//$NON-NLS-1$
+	private static String RELATIVE_PATH_SIG = "..";//$NON-NLS-1$	
+	private static final String FORWARD_SLASH = "/";//$NON-NLS-1$	
+	private URL fBaseUrl = null; // base url. assumed to a absulute url
+	private String fBaseUrlString = null;
+	private URL fDocRoot = null;
+	private String fDocRootString = null;
+
+	public LinkURLHelper(String baseUrl) {
+		initialize(baseUrl, null);
+	}
+
+
+	public LinkURLHelper(String baseUrl, String docRoot) {
+		initialize(baseUrl, docRoot);
+	}
+
+	/**
+	 * Special adujust for file url
+	 */
+	public String adjustFileProtocolUrl(String url) {
+		if (url.startsWith(FILE_PROTOCOL_SEARCH_SIG)) {
+			url = FILE_PROTOCOL_SIG + url.substring(FILE_PROTOCOL_SEARCH_SIG.length());
+		}
+		return url;
+	}
+
+	private String convert(String url, URL baseUrl, String urlString) {
+		String absUrl = url;
+		if (baseUrl != null) {
+			try {
+				// do special thing file protocol
+				if (baseUrl.getProtocol().equalsIgnoreCase("file")) {//$NON-NLS-1$
+					// remove the fist
+					if (url.startsWith("/"))//$NON-NLS-1$
+						url = url.substring(1);
+					// empty string causes malformed exception	
+					String tempUrl = url;
+					if ("".equals(url))//$NON-NLS-1$
+						tempUrl = " ";//$NON-NLS-1$
+					URL newUrl = new URL(baseUrl, tempUrl);
+					// do extra math for file protocol to support ie based
+					absUrl = adjustFileProtocolUrl(newUrl.toString());
+				}
+				else {
+					URL newUrl = new URL(fBaseUrl, url);
+					absUrl = newUrl.toString();
+				}
+			}
+			catch (MalformedURLException me) {
+			}
+			// convert everything to forward slash
+			absUrl = PathHelper.switchToForwardSlashes(absUrl);
+		}
+		else {
+			// the given may be based on file
+			if (urlString != null) {
+				// swich the url to proper direction
+				url = PathHelper.removeLeadingSeparator(url);
+				File fle = new File(urlString, url);
+				absUrl = fle.getPath();
+
+			}
+			// convert everything to forward slash
+			absUrl = PathHelper.switchToForwardSlashes(absUrl);
+
+			// if the path ends with ".." we need to add a terminating slash or 
+			// else the link will not be resolved correctly.  (it will look like
+			// /url/path/to/somewhere/.. instead of /url/path/to/
+			if (absUrl.endsWith(FORWARD_SLASH + RELATIVE_PATH_SIG)) {
+				absUrl += FORWARD_SLASH;
+			}
+		}
+
+		// resolve relative path to absolute
+		absUrl = PathHelper.adjustPath(absUrl);
+		return absUrl;
+	}
+
+	private void initialize(String baseUrl, String docRoot) {
+		//
+		// Find out whether baes url is a url or file name
+		//
+		if ( URI.validScheme(baseUrl) ) {
+			try {
+				String temp = PathHelper.appendTrailingURLSlash(baseUrl);
+				fBaseUrl = new URL(temp);
+			}
+			catch (MalformedURLException mue) {
+				// it is a file based url
+				fBaseUrlString = baseUrl;
+			}
+		}
+		else {
+			// it is a file based url
+			fBaseUrlString = baseUrl;
+		}
+
+		// do the same for doc root
+		if (docRoot != null) {
+			if ( URI.validScheme(docRoot) ) {
+				try {
+					String temp = PathHelper.appendTrailingURLSlash(docRoot);
+					fDocRoot = new URL(temp);
+	
+				}
+				catch (MalformedURLException mue) {
+					// it is a file based url
+					fDocRootString = docRoot;
+				}
+			}
+			else {
+				// it is a file based url
+				fDocRootString = docRoot;
+			}
+		}
+	}
+
+	/**
+	 *  Convert the given url to a abolute url using the base url
+	 *  Input url can be of any othe following format
+	 * Absolute urls
+	 * --------------
+	 *  . http://www.foo.com/
+	 *  . http://www.foo.com
+	 *  . http://www.foo.com/folder
+	 *  . http://www.foo.com/folder/
+	 *  . http://www.foo.com/index.html
+	 *  . http://www.foo.com/folder/index.html
+	 *  . http://www.foo.com/folder/../index.html
+	 * Url relative  on document root
+	 * -------------------------
+	 *  . /
+	 *  . /folder
+	 *  . /index.html
+	 *  . /folder/index.html
+	 *  . /folder/../index.html
+	 * 
+	 * Self relative
+	 * -------------------------
+	 *  . index.html
+	 *  . ./index.html
+	 *  . ../index.html
+	 *  . folder/index.html
+	 *  . folder/../index.html
+	 *
+	 * file based url adds another dimension since it doesn't have a document root
+	 * So uses fDocRoot if provided
+	 */
+	public String toAbsolute(String url) {
+		String absUrl = url;
+
+		URL newUrl = null;
+		// try to see it is a absolute url
+		if ( URI.validScheme(url) ) {
+			try {
+				newUrl = new URL(url);
+			}
+			catch (MalformedURLException me) {
+			}
+		}
+		// if document root is provided
+		// do special case
+		if (newUrl == null) {
+			if (fDocRoot == null && fDocRootString == null) {
+				// try to check relative url
+				absUrl = convert(url, fBaseUrl, fBaseUrlString);
+			}
+			else {
+				// doc root is provided
+				// if the url is a doc root based use doc root
+
+				if (url.startsWith("/"))//$NON-NLS-1$
+					absUrl = convert(url, fDocRoot, fDocRootString);
+				else
+					absUrl = convert(url, fBaseUrl, fBaseUrlString);
+
+			}
+		}
+		return absUrl;
+	}
+
+	/**
+	 * Convert from an absolute url to relative url based on the given url
+	 * Both are assumed to be ablsute url
+	 */
+	public String toRelative(String url, String documentUrl) {
+		String output = url;
+		// assuming both urls are absolute
+		try {
+			URL inputUrl = new URL(url);
+			URL docUrl = new URL(documentUrl);
+			// filter out if the urls are not fro the same domain
+			if (!inputUrl.getProtocol().equals(docUrl.getProtocol()) || !inputUrl.getHost().equals(docUrl.getHost()) || inputUrl.getPort() != docUrl.getPort())
+				return output;
+			// both url are coming form the same place
+			// strip off the domain parts
+			String inputName = inputUrl.getFile();
+			String docName = docUrl.getFile();
+			output = PathHelper.convertToRelative(inputName, docName);
+		}
+		catch (MalformedURLException me) {
+			output = null;
+		}
+		return output;
+	}
+
+//	/*
+//	 */
+//	protected  String getScheme(String passedSpec) {
+//		if (passedSpec != null) {
+//	
+//			final String spec = passedSpec.trim();
+//			
+//			// protocol(scheme) java.net.URL can recognize is detemined
+//			// what URL.getURLStreamHandle(protocol) returns.
+//			// in Eclipse, only :
+//			//		valoader:
+//			//		file:
+//			//		jar:
+//			//		platform:
+//			//		doc:
+//			//		ftp:
+//			//		gopher:
+//			//		http:
+//			//		mailto:
+//			//		netdoc:
+//			//		systemresource:
+//			//		verbatim:
+//			// can recognize. Otherwise, it throws exception...
+//			// the following code comes from hpbcom/url.cpp, Url::parse_protocol()
+//			final int limit = spec.length();
+//			String newProtocol = null;
+//			for( int index = 0; index < limit; index++ ) {
+//				final char p = spec.charAt(index);
+//				if (p == '/') {
+//					break;
+//				}
+//				if (p == ':') {
+//					newProtocol = spec.substring(0, index);
+//					break;
+//				}
+//			}
+//			// copy end
+//		
+//			 			
+//			if (newProtocol != null && newProtocol.length() > 1 ) {
+//				for ( int i = 0; i < PROTOCOLS.length; i++ ){
+//					if (newProtocol.compareToIgnoreCase(PROTOCOLS[i]) == 0) {
+//						// matched;
+//						return newProtocol;
+//					}
+//				}
+//			}
+//		}
+//		//i don't know what is newProtocol. Ask URI class itself.
+//		//No, calling URI again is very slow. So, just give up
+//		//URI uri = new URI(spec);
+//		//return uri.getScheme();
+//		return null;//$NON-NLS-1$
+//	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java
new file mode 100644
index 0000000..7f93a4f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java
@@ -0,0 +1,86 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.util;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.text.edits.TextEditGroup;
+
+/**
+ * A utility class to provide compatibility with the old
+ * text change API of adding text edits directly and auto
+ * inserting them into the tree.
+ */
+public class TextChangeCompatibility {
+
+	public static void addTextEdit(TextChange change, String name, TextEdit edit) {
+		Assert.isNotNull(change);
+		Assert.isNotNull(name);
+		Assert.isNotNull(edit);
+		TextEdit root= change.getEdit();
+		if (root == null) {
+			root= new MultiTextEdit();
+			change.setEdit(root);
+		}
+		insert(root, edit);
+		change.addTextEditGroup(new TextEditGroup(name, edit));
+	}
+	
+	public static void addTextEdit(TextChange change, String name, TextEdit[] edits) {
+		Assert.isNotNull(change);
+		Assert.isNotNull(name);
+		Assert.isNotNull(edits);
+		TextEdit root= change.getEdit();
+		if (root == null) {
+			root= new MultiTextEdit();
+			change.setEdit(root);
+		}
+		for (int i= 0; i < edits.length; i++) {
+			insert(root, edits[i]);
+		}
+		change.addTextEditGroup(new TextEditGroup(name, edits));
+	}
+	
+	public static void insert(TextEdit parent, TextEdit edit) {
+		if (!parent.hasChildren()) {
+			parent.addChild(edit);
+			return;
+		}
+		TextEdit[] children= parent.getChildren();
+		// First dive down to find the right parent.
+		for (int i= 0; i < children.length; i++) {
+			TextEdit child= children[i];
+			if (covers(child, edit)) {
+				insert(child, edit);
+				return;
+			}
+		}
+		// We have the right parent. Now check if some of the children have to
+		// be moved under the new edit since it is covering it.
+		for (int i= children.length - 1; i >= 0; i--) {
+			TextEdit child= children[i];
+			if (covers(edit, child)) {
+				parent.removeChild(i);
+				edit.addChild(child);
+			}
+		}
+		parent.addChild(edit);
+	}
+	
+	private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) {
+		if (thisEdit.getLength() == 0)	// an insertion point can't cover anything
+			return false;
+		
+		int thisOffset= thisEdit.getOffset();
+		int thisEnd= thisEdit.getExclusiveEnd();	
+		if (otherEdit.getLength() == 0) {
+			int otherOffset= otherEdit.getOffset();
+			return thisOffset < otherOffset && otherOffset < thisEnd;
+		} else {
+			int otherOffset= otherEdit.getOffset();
+			int otherEnd= otherEdit.getExclusiveEnd();
+			return thisOffset <= otherOffset && otherEnd <= thisEnd;
+		}
+	}		
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorActionGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorActionGroup.java
new file mode 100644
index 0000000..303d1dc
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorActionGroup.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.events.MenuAdapter;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.wst.xsd.ui.internal.refactor.actions.RenameAction;
+import org.eclipse.wst.xsd.ui.internal.refactor.actions.SelectionDispatchAction;
+
+/**
+ * Action group that adds refactor actions (for example 'Rename', 'Move') to a
+ * context menu and the global menu bar.
+ * 
+ */
+public abstract class RefactorActionGroup extends ActionGroup {
+	
+	private static class NoActionAvailable extends Action {
+		public NoActionAvailable() {
+			setEnabled(true);
+			setText(RefactoringWizardMessages.RefactorActionGroup_no_refactoring_available); 
+		}
+	}
+
+	/**
+	 * Pop-up menu: name of group for reorganize actions (value
+	 * <code>"group.reorganize"</code>).
+	 */
+	public static final String GROUP_REORGANIZE = IWorkbenchActionConstants.GROUP_REORGANIZE;
+
+	public static final String MENU_ID = "org.eclipse.wst.xsd.ui.refactoring.menu"; //$NON-NLS-1$
+
+	public static final String RENAME = "org.eclipse.wst.xsd.ui.refactoring.actions.Rename"; //$NON-NLS-1$
+
+
+	protected static void initAction(SelectionDispatchAction action,
+			ISelection selection) {
+
+		Assert.isNotNull(selection);
+		Assert.isNotNull(action);
+		action.update(selection);
+		//provider.addSelectionChangedListener(action);
+	}
+
+	protected List fEditorActions;
+
+	private String fGroupName = GROUP_REORGANIZE;
+	
+	private Action fNoActionAvailable = new NoActionAvailable();
+
+	protected RenameAction fRenameAction;
+
+	protected SelectionDispatchAction fRenameTargetNamespace;
+
+	protected ISelection selection;
+	
+	public RefactorActionGroup(ISelection selection) {
+			this.selection = selection;
+			
+	}
+
+	public int addAction(IAction action) {
+		if (action != null && action.isEnabled()) {
+			fEditorActions.add(action);
+			return 1;
+		}
+		return 0;
+	}
+
+	private void addRefactorSubmenu(IMenuManager menu) {
+
+		IMenuManager refactorSubmenu = new MenuManager(RefactoringWizardMessages.RefactorMenu_label, MENU_ID);
+		refactorSubmenu.addMenuListener(new IMenuListener() {
+				public void menuAboutToShow(IMenuManager manager) {
+					refactorMenuShown(manager);
+				}
+			});
+		refactorSubmenu.add(fNoActionAvailable);
+			if (menu.find(refactorSubmenu.getId()) == null) {
+				if (menu.find(fGroupName) == null) {
+					menu.add(refactorSubmenu);
+				} else {
+					menu.appendToGroup(fGroupName, refactorSubmenu);
+				}
+			}
+	}
+
+	protected void disposeAction(ISelectionChangedListener action,
+			ISelectionProvider provider) {
+		if (action != null)
+			provider.removeSelectionChangedListener(action);
+	}
+
+	/*
+	 * (non-Javadoc) Method declared in ActionGroup
+	 */
+	public void fillActionBars(IActionBars actionBars) {
+		super.fillActionBars(actionBars);
+		actionBars.setGlobalActionHandler(RENAME, fRenameAction);
+		retargetFileMenuActions(actionBars);
+	}
+
+	public void fillActions(List enabledActions) {
+		
+		if(selection != null && fEditorActions != null){
+			for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
+				Action action = (Action) iter.next();
+				if (action instanceof SelectionDispatchAction) {
+					SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
+					selectionAction.update(selection);
+				}
+
+			}
+			for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
+				Action action = (Action) iter.next();
+				if (action != null && action.isEnabled()) {
+					enabledActions.add(action);
+				}
+			}
+		}
+		
+	}
+
+	/*
+	 * (non-Javadoc) Method declared in ActionGroup
+	 */
+	public void fillContextMenu(IMenuManager menu) {
+		super.fillContextMenu(menu);
+		addRefactorSubmenu(menu);
+	}
+
+	private int fillRefactorMenu(IMenuManager refactorSubmenu) {
+		int added = 0;
+		refactorSubmenu.add(new Separator(GROUP_REORGANIZE));
+		for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
+			Action action = (Action) iter.next();
+			if (action != null && action.isEnabled()) {
+				fEditorActions.add(action);
+				return 1;
+			}
+		}
+		return added;
+	}
+
+	private void refactorMenuHidden(IMenuManager manager) {
+
+		for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
+			Action action = (Action) iter.next();
+			if (action instanceof SelectionDispatchAction) {
+				SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
+				selectionAction.update(selection);
+			}
+
+		}
+	}
+
+	private void refactorMenuShown(final IMenuManager refactorSubmenu) {
+		// we know that we have an MenuManager since we created it in
+		// addRefactorSubmenu.
+		Menu menu = ((MenuManager) refactorSubmenu).getMenu();
+		menu.addMenuListener(new MenuAdapter() {
+			public void menuHidden(MenuEvent e) {
+				refactorMenuHidden(refactorSubmenu);
+			}
+		});
+
+		for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
+			Action action = (Action) iter.next();
+			if (action instanceof SelectionDispatchAction) {
+				SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
+				selectionAction.update(selection);
+			}
+		}
+		refactorSubmenu.removeAll();
+		if (fillRefactorMenu(refactorSubmenu) == 0)
+			refactorSubmenu.add(fNoActionAvailable);
+	}
+
+	/**
+	 * Retargets the File actions with the corresponding refactoring actions.
+	 * 
+	 * @param actionBars
+	 *            the action bar to register the move and rename action with
+	 */
+	public void retargetFileMenuActions(IActionBars actionBars) {
+		actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(),
+				fRenameAction);
+	}
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java
new file mode 100644
index 0000000..983a838
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java
@@ -0,0 +1,135 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.events.MenuAdapter;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+public abstract class RefactorGroupActionDelegate implements IObjectActionDelegate, IEditorActionDelegate, IMenuCreator {
+
+	protected ISelection fSelection;
+	private IAction fDelegateAction;
+	// whether to re-fill the menu (reset on selection change)
+	private boolean fFillMenu = true;
+	protected IWorkbenchPart workbenchPart; 
+	protected ResourceSet resourceSet = new ResourceSetImpl();
+	
+
+	public RefactorGroupActionDelegate() {
+
+	}
+	
+	/*
+	 * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+		workbenchPart = targetPart;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.IMenuCreator#dispose()
+	 */
+	public void dispose() {
+		// nothing to do
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
+	 */
+	public Menu getMenu(Control parent) {
+		// never called
+		return null;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
+	 */
+	public Menu getMenu(Menu parent) {
+		//Create the new menu. The menu will get filled when it is about to be shown. see fillMenu(Menu).
+		Menu menu = new Menu(parent);
+		/**
+		 * Add listener to repopulate the menu each time
+		 * it is shown because MenuManager.update(boolean, boolean) 
+		 * doesn't dispose pulldown ActionContribution items for each popup menu.
+		 */
+		menu.addMenuListener(new MenuAdapter() {
+			public void menuShown(MenuEvent e) {
+				if (fFillMenu) {
+					Menu m = (Menu)e.widget;
+					MenuItem[] items = m.getItems();
+					for (int i=0; i < items.length; i++) {
+						items[i].dispose();
+					}
+					fillMenu(m);
+					fFillMenu = false;
+				}
+			}
+		});
+		return menu;
+	}
+
+	/*
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+		// Never called because we become a menu.
+	}
+	
+	/*
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		fDelegateAction = action;
+		updateWith(selection);
+		
+	}
+
+    public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		workbenchPart = targetEditor;
+		fDelegateAction = action;
+		if (targetEditor != null && targetEditor.getEditorSite() != null && targetEditor.getEditorSite().getSelectionProvider() != null) {
+			updateWith(targetEditor.getEditorSite().getSelectionProvider().getSelection());
+		}
+		
+	}
+    
+	public void updateWith(ISelection selection) {
+		fSelection = selection;
+		if (fDelegateAction != null) {
+			boolean enable = false;
+			if (selection != null) {
+				if (selection instanceof ITextSelection) {
+					//if (((ITextSelection) selection).getLength() > 0) {
+						enable = true;
+					//}
+				}
+				else if(selection instanceof IStructuredSelection ){
+					enable = !selection.isEmpty();
+				}
+			}
+			// enable action
+			fDelegateAction.setEnabled(enable);
+			
+			// fill submenu
+			fFillMenu = true;
+			fDelegateAction.setMenuCreator(this);
+			
+			
+		}
+		
+	}
+	
+	
+    protected abstract void fillMenu(Menu menu);
+	
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java
new file mode 100644
index 0000000..e402607
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java
@@ -0,0 +1,46 @@
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.ui.actions.CompoundContributionItem;
+
+public class RefactorGroupSubMenu extends CompoundContributionItem {
+
+	RefactorActionGroup fRefactorMenuGroup;
+	
+
+	public RefactorGroupSubMenu(RefactorActionGroup refactorMenuGroup) {
+		super();
+		fRefactorMenuGroup = refactorMenuGroup;
+	}
+
+	public RefactorGroupSubMenu(String id) {
+		super(id);
+	}
+
+	protected IContributionItem[] getContributionItems() {
+		  ArrayList actionsList = new ArrayList();
+		  ArrayList contribList = new ArrayList();
+		  fRefactorMenuGroup.fillActions(actionsList);
+	         
+	        if (actionsList != null && !actionsList.isEmpty()) {
+	            for (Iterator iter = actionsList.iterator(); iter.hasNext();) {
+	     			IAction action = (IAction) iter.next();
+	     			contribList.add(new ActionContributionItem(action));
+	     		}
+	        } else {
+	            Action dummyAction = new Action(RefactoringWizardMessages.RefactorActionGroup_no_refactoring_available) {
+	                // dummy inner class; no methods
+	            };
+	            dummyAction.setEnabled(false);
+	            contribList.add(new ActionContributionItem(dummyAction));
+	        }
+	        return (IContributionItem[]) contribList.toArray(new IContributionItem[contribList.size()]);
+
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactoringWizardMessages.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactoringWizardMessages.java
new file mode 100644
index 0000000..03140c8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactoringWizardMessages.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+import org.eclipse.osgi.util.NLS;
+
+public class RefactoringWizardMessages  extends NLS {
+
+	private static final String BUNDLE_NAME= "org.eclipse.wst.xsd.ui.internal.refactor.wizard.messages";//$NON-NLS-1$
+
+	public static String RefactorMenu_label;
+	public static String RefactorActionGroup_no_refactoring_available;
+
+	public static String RenameAction_rename;
+	public static String RenameAction_unavailable;
+	public static String RenameAction_text;
+
+	public static String RenameInputWizardPage_new_name;
+	public static String RenameRefactoringWizard_internal_error;
+	
+	public static String RenameTargetNamespace_text;
+
+	public static String RenameXSDElementAction_exception;
+	public static String RenameXSDElementAction_not_available;
+	public static String RenameXSDElementAction_name;
+
+	public static String RenameSupport_dialog_title;
+	public static String RenameSupport_not_available;
+
+	public static String RenameComponentWizard_defaultPageTitle;
+	public static String RenameComponentWizard_inputPage_description;
+
+	public static String RenameInputWizardPage_update_references;
+	public static String XSDComponentRenameChange_name;
+	public static String XSDComponentRenameChange_Renaming;
+	public static String ResourceRenameParticipant_compositeChangeName;
+	public static String RenameResourceChange_rename_resource_reference_change;
+	public static String XSDRenameResourceChange_name;
+	public static String RenameResourceRefactoring_Internal_Error;
+	public static String RenameResourceRefactoring_alread_exists;
+	public static String RenameResourceRefactoring_invalidName;
+	public static String RenameResourceProcessor_name;
+	public static String MakeAnonymousTypeGlobalAction_text; 
+	public static String MakeLocalElementGlobalAction_text;
+	public static String XSDComponentRenameParticipant_Component_Refactoring_updates;
+	public static String WSDLComponentRenameParticipant_Component_Refactoring_updates;
+	public static String RenameComponentProcessor_Component_Refactoring_updates;
+	public static String RenameComponentProcessor_Component_Refactoring_update_declatation;
+	public static String RenameComponentProcessor_Component_Refactoring_update_reference;
+	public static String XSDComponentRenameParticipant_xsd_component_rename_participant;
+	public static String WSDLComponentRenameParticipant_wsdl_component_rename_participant;
+	public static String ResourceRenameParticipant_File_Rename_update_reference;
+
+
+	private RefactoringWizardMessages() {
+		// Do not instantiate
+	}
+
+	static {
+		NLS.initializeMessages(BUNDLE_NAME, RefactoringWizardMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameInputWizardPage.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameInputWizardPage.java
new file mode 100644
index 0000000..5d4ccd4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameInputWizardPage.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.xsd.ui.internal.refactor.IReferenceUpdating;
+import org.eclipse.wst.xsd.ui.internal.refactor.RefactoringMessages;
+
+/**
+ * @author ebelisar
+ *
+ */
+public class RenameInputWizardPage  extends UserInputWizardPage{
+	private String fInitialValue;
+	private Text fTextField;
+	private Button fUpdateReferences;
+	/**
+	 * Creates a new text input page.
+	 * @param isLastUserPage <code>true</code> if this page is the wizard's last
+	 *  user input page. Otherwise <code>false</code>.
+	 */
+	public RenameInputWizardPage(String description, boolean isLastUserPage) {
+		this(description, isLastUserPage, ""); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Creates a new text input page.
+	 * @param isLastUserPage <code>true</code> if this page is the wizard's last
+	 *  user input page. Otherwise <code>false</code>
+	 * @param initialValue the initial value
+	 */
+	public RenameInputWizardPage(String description, boolean isLastUserPage, String initialValue) {
+	    super("RenameInputWizardPage");
+		Assert.isNotNull(initialValue);
+		setDescription(description);
+		fInitialValue= initialValue;
+	}
+	
+	/**
+	 * Returns whether the initial input is valid. Typically it is not, because the 
+	 * user is required to provide some information e.g. a new type name etc.
+	 * 
+	 * @return <code>true</code> iff the input provided at initialization is valid
+	 */
+	protected boolean isInitialInputValid(){
+		return false;
+	}
+	
+	/**
+	 * Returns whether an empty string is a valid input. Typically it is not, because 
+	 * the user is required to provide some information e.g. a new type name etc.
+	 * 
+	 * @return <code>true</code> iff an empty string is valid
+	 */
+	protected boolean isEmptyInputValid(){
+		return false;
+	}
+	
+	/**
+	 * Returns the content of the text input field.
+	 * 
+	 * @return the content of the text input field. Returns <code>null</code> if
+	 * not text input field has been created
+	 */
+	protected String getText() {
+		if (fTextField == null)
+			return null;
+		return fTextField.getText();	
+	}
+	
+	/**
+	 * Sets the new text for the text field. Does nothing if the text field has not been created.
+	 * @param text the new value
+	 */
+	protected void setText(String text) {
+		if (fTextField == null)
+			return;
+		fTextField.setText(text);
+	}
+	
+	/**
+	 * Performs input validation. Returns a <code>RefactoringStatus</code> which
+	 * describes the result of input validation. <code>Null<code> is interpreted
+	 * as no error.
+	 */
+	protected RefactoringStatus validateTextField(String text){
+		return null;
+	}
+	
+	protected Text createTextInputField(Composite parent) {
+		return createTextInputField(parent, SWT.BORDER);
+	}
+	
+	protected Text createTextInputField(Composite parent, int style) {
+		fTextField= new Text(parent, style);
+		fTextField.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				textModified(getText());
+			}
+		});
+		fTextField.setText(fInitialValue);
+		return fTextField;
+	}
+	
+	/**
+	 * Checks the page's state and issues a corresponding error message. The page validation
+	 * is computed by calling <code>validatePage</code>.
+	 */
+	protected void textModified(String text) {	
+		if (! isEmptyInputValid() && text.equals("")){ //$NON-NLS-1$
+			setPageComplete(false);
+			setErrorMessage(null);
+			restoreMessage();
+			return;
+		}
+		if ((! isInitialInputValid()) && text.equals(fInitialValue)){
+			setPageComplete(false);
+			setErrorMessage(null);
+			restoreMessage();
+			return;
+		}
+		
+		setPageComplete(validateTextField(text));
+		
+//		 TODO: enable preview in M4
+		getRefactoringWizard().setForcePreviewReview(false);
+		getContainer().updateButtons();
+	
+	}
+	
+	/**
+	 * Subclasses can override if they want to restore the message differently.
+	 * This implementation calls <code>setMessage(null)</code>, which clears the message 
+	 * thus exposing the description.
+	 */
+	protected void restoreMessage(){
+		setMessage(null);
+	}
+	
+	/* (non-Javadoc)
+	 * Method declared in IDialogPage
+	 */
+	public void dispose() {
+		fTextField= null;	
+	}
+	
+	/* (non-Javadoc)
+	 * Method declared in WizardPage
+	 */
+	public void setVisible(boolean visible) {
+		if (visible) {
+			textModified(getText());
+		}
+		super.setVisible(visible);
+		if (visible && fTextField != null) {
+			fTextField.setFocus();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite superComposite= new Composite(parent, SWT.NONE);
+		setControl(superComposite);
+		initializeDialogUnits(superComposite);
+		
+		superComposite.setLayout(new GridLayout());
+		Composite composite= new Composite(superComposite, SWT.NONE);
+		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));	
+		
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.verticalSpacing= 8;
+		composite.setLayout(layout);
+		
+		
+		Label label= new Label(composite, SWT.NONE);
+		label.setText(getLabelText());
+		
+		Text text= createTextInputField(composite);
+		text.selectAll();
+		GridData gd= new GridData(GridData.FILL_HORIZONTAL);
+		gd.widthHint= convertWidthInCharsToPixels(25);
+		text.setLayoutData(gd);
+		
+		addOptionalUpdateReferencesCheckbox(superComposite);
+		gd= new GridData(GridData.FILL_HORIZONTAL);
+		text.setLayoutData(gd);
+		
+		getRefactoringWizard().setForcePreviewReview(false);
+		
+		Dialog.applyDialogFont(superComposite);
+		//WorkbenchHelp.setHelp(getControl(), fHelpContextID);
+
+	}
+	
+	private static Button createCheckbox(Composite parent, String title, boolean value) {
+		Button checkBox= new Button(parent, SWT.CHECK);
+		checkBox.setText(title);
+		checkBox.setSelection(value);
+		return checkBox;		
+	}
+	
+	private void addOptionalUpdateReferencesCheckbox(Composite result) {
+
+		final IReferenceUpdating ref= (IReferenceUpdating)getRefactoring().getAdapter(IReferenceUpdating.class);
+		if (ref == null || !ref.canEnableUpdateReferences())	
+			return;
+		String title= RefactoringMessages.getString("RenameInputWizardPage.update_references"); //$NON-NLS-1$
+		boolean defaultValue= true; 
+		fUpdateReferences= createCheckbox(result, title, defaultValue);
+		ref.setUpdateReferences(fUpdateReferences.getSelection());
+		fUpdateReferences.addSelectionListener(new SelectionAdapter(){
+			public void widgetSelected(SelectionEvent e) {
+    		ref.setUpdateReferences(fUpdateReferences.getSelection());
+			}
+		});				
+		fUpdateReferences.setEnabled(true);		
+	}
+	
+	protected String getLabelText() {
+		return RefactoringMessages.getString("RenameInputWizardPage.new_name"); //$NON-NLS-1$
+	}
+	
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java
new file mode 100644
index 0000000..8200353
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.xsd.ui.internal.refactor.wizard;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating;
+
+public class RenameRefactoringWizard extends RefactoringWizard {
+	
+	private final String fInputPageDescription;
+
+	private final ImageDescriptor fInputPageImageDescriptor;
+	
+	public RenameRefactoringWizard(Refactoring refactoring, String defaultPageTitle, String inputPageDescription, 
+			ImageDescriptor inputPageImageDescriptor) {
+		super(refactoring, DIALOG_BASED_USER_INTERFACE);
+		setDefaultPageTitle(defaultPageTitle);
+    	fInputPageDescription= inputPageDescription;
+		fInputPageImageDescriptor= inputPageImageDescriptor;
+
+	}
+
+	/* non java-doc
+	 * @see RefactoringWizard#addUserInputPages
+	 */ 
+	protected void addUserInputPages() {
+		String initialSetting= getProcessor().getCurrentElementName();
+		RenameInputWizardPage inputPage= createInputPage(fInputPageDescription, initialSetting);
+		inputPage.setImageDescriptor(fInputPageImageDescriptor);
+		addPage(inputPage);
+	}
+
+	protected INameUpdating getProcessor() {
+		
+		return (INameUpdating)getRefactoring().getAdapter(INameUpdating.class);	
+	}
+	
+	
+	protected RenameInputWizardPage createInputPage(String message, String initialSetting) {
+		return new RenameInputWizardPage(message, true, initialSetting) {
+			protected RefactoringStatus validateTextField(String text) {
+				return validateNewName(text);
+			}	
+		};
+	}
+	
+	protected RefactoringStatus validateNewName(String newName) {
+		INameUpdating ref= getProcessor();
+		ref.setNewElementName(newName);
+//		try{
+			return ref.checkNewElementName(newName);
+//		} catch (CoreException e){
+//			//XXX: should log the exception
+//			String msg= e.getMessage() == null ? "": e.getMessage(); //$NON-NLS-1$
+//			return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.getFormattedString("RenameRefactoringWizard.internal_error", msg));//$NON-NLS-1$
+//		}	
+	}
+	
+	
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/messages.properties b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/messages.properties
new file mode 100644
index 0000000..7bcd71f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/messages.properties
@@ -0,0 +1,55 @@
+###############################################################################
+# Copyright (c) 2001, 2004 IBM Corporation and others.
+# 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:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+RefactorMenu_label=Refactor
+RefactorActionGroup_no_refactoring_available=<no refactoring available>
+
+RenameAction_rename=Rename
+RenameAction_unavailable=Operation unavailable on the current selection.\nSelect a ....
+RenameAction_text=Re&name...
+
+RenameInputWizardPage_new_name= &New name:
+RenameRefactoringWizard_internal_error= Internal error during name checking: {0}
+
+
+RenameXSDElementAction_exception=Unexpected exception occurred. See log for details
+RenameXSDElementAction_not_available=Operation unavailable on the current selection.\nSelect a XSD project, folder, resource, file, attribute declarations,  attribute group definitions, complex type definitions, element declarations, identity constraint definitions, model groups definitions, notation declarations, or simple type definitions.
+RenameXSDElementAction_name=Rename
+
+
+RenameSupport_dialog_title=Rename
+RenameSupport_not_available=Rename support not available
+
+RenameComponentWizard_defaultPageTitle=Rename wizard
+RenameComponentWizard_inputPage_description=Rename XML Schema component
+
+RenameInputWizardPage_update_references=Update references
+XSDComponentRenameChange_name=XML Schema component renaming in {0}: {1} to {2}
+XSDComponentRenameChange_Renaming=Renaming...
+ResourceRenameParticipant_compositeChangeName=XSD file rename references updating changes
+RenameResourceChange_rename_resource_reference_change=Renaming resource name references
+XSDRenameResourceChange_name=Resource rename: {0} to {1}
+RenameResourceRefactoring_Internal_Error=Internal error
+RenameResourceRefactoring_alread_exists=Resource already exist
+RenameResourceRefactoring_invalidName=Invalid resource name
+RenameResourceProcessor_name=Resource renaming
+MakeAnonymousTypeGlobalAction_text=Make Anonymous Type Global 
+MakeLocalElementGlobalAction_text=Make Local Element Global
+XSDComponentRenameParticipant_Component_Refactoring_updates=XML Schema refactoring changes
+WSDLComponentRenameParticipant_Component_Refactoring_updates=WSDL Schema refactoring changes
+RenameComponentProcessor_Component_Refactoring_updates=Component name refactoring changes
+RenameComponentProcessor_Component_Refactoring_update_declatation=Update component declaration/definition
+RenameComponentProcessor_Component_Refactoring_update_reference=Update component reference
+XSDComponentRenameParticipant_xsd_component_rename_participant=XSD component rename participant
+WSDLComponentRenameParticipant_wsdl_component_rename_participant=WSDL component rename participant
+ResourceRenameParticipant_File_Rename_update_reference=File rename refactoring changes
+
+RenameTargetNamespace_text=Rename Target Namespace
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java
new file mode 100644
index 0000000..b65703a
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java
@@ -0,0 +1,18 @@
+package org.eclipse.wst.xsd.ui.internal.search;
+
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+
+// todo ... move
+public interface IXSDSearchConstants {
+	
+	public static final String XMLSCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
+	public static String XSD_CONTENT_TYPE_ID = "org.eclipse.wst.xsd.core.xsdsource";
+	
+    public static final QualifiedName   COMPLEX_TYPE_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "complexType");
+    public static final QualifiedName   SIMPLE_TYPE_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "simpleType");
+    public static final QualifiedName   ELEMENT_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "element");
+	public static final QualifiedName   ATTRIBUTE_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "attribute");
+	public static final QualifiedName   ATTRIBUTE_GROUP_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "attributeGroup");
+	public static final QualifiedName   GROUP_META_NAME =  new QualifiedName (XMLSCHEMA_NAMESPACE, "group");
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java
new file mode 100644
index 0000000..3fdc553
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java
@@ -0,0 +1,68 @@
+package org.eclipse.wst.xsd.ui.internal.search;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.eclipse.wst.xml.core.internal.search.ComponentSearchContributor;
+import org.eclipse.wst.xml.core.internal.search.XMLSearchPattern;
+
+public class XSDSearchContributor extends ComponentSearchContributor  {
+ 
+	
+	protected void initializeReferences() {
+		references = new HashMap();
+		String ns = IXSDSearchConstants.XMLSCHEMA_NAMESPACE;
+
+		List patterns = new ArrayList();
+		patterns.add(new XMLSearchPattern( ns, "element", "ref"));
+		patterns.add(new XMLSearchPattern( ns, "element", "substitutionGroup"));
+		references.put(IXSDSearchConstants.ELEMENT_META_NAME, patterns);
+
+		patterns = new ArrayList();
+		patterns.add(new XMLSearchPattern( ns, "restriction", "base"));
+		patterns.add(new XMLSearchPattern( ns, "extension", "base"));
+		patterns.add(new XMLSearchPattern( ns, "element", "type"));
+		references.put(IXSDSearchConstants.COMPLEX_TYPE_META_NAME, patterns);
+
+		patterns = new ArrayList();
+		patterns.add(new XMLSearchPattern( ns, "restriction", "base"));
+		patterns.add(new XMLSearchPattern( ns, "extension", "base"));
+		patterns.add(new XMLSearchPattern( ns, "attribute", "type"));
+		patterns.add(new XMLSearchPattern( ns, "union", "memberTypes"));
+
+		references.put(IXSDSearchConstants.SIMPLE_TYPE_META_NAME, patterns);
+
+	}
+
+	protected void initializeDeclarations(){
+		
+		declarations = new HashMap();
+		String ns = IXSDSearchConstants.XMLSCHEMA_NAMESPACE;
+
+		SearchPattern pattern = new XMLSearchPattern( ns, "element", "name");
+		declarations.put(IXSDSearchConstants.ELEMENT_META_NAME, pattern);
+
+		pattern = new XMLSearchPattern(ns, "complexType", "name");
+		declarations.put(IXSDSearchConstants.COMPLEX_TYPE_META_NAME, pattern);
+
+		pattern = new XMLSearchPattern(ns, "simpleType", "name");
+		declarations.put(IXSDSearchConstants.SIMPLE_TYPE_META_NAME, pattern);
+
+		pattern = new XMLSearchPattern(ns, "attribute", "name");
+		declarations.put(IXSDSearchConstants.ATTRIBUTE_META_NAME, pattern);
+
+		pattern = new XMLSearchPattern(ns, "attributeGroup", "name");
+		declarations.put(IXSDSearchConstants.ATTRIBUTE_GROUP_META_NAME, pattern);
+
+		pattern = new XMLSearchPattern(ns, "group", "name");
+		declarations.put(IXSDSearchConstants.GROUP_META_NAME, pattern);
+
+	}
+
+	protected void initializeSupportedNamespaces() {
+		namespaces = new String[]{ IXSDSearchConstants.XMLSCHEMA_NAMESPACE};
+	}
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java
new file mode 100644
index 0000000..ae0b1a6
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java
@@ -0,0 +1,32 @@
+package org.eclipse.wst.xsd.ui.internal.search;
+
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.eclipse.wst.xml.core.internal.search.ComponentSearchContributor;
+import org.eclipse.wst.xml.core.internal.search.XMLComponentSearchPattern;
+import org.eclipse.wst.xml.core.internal.search.XMLSearchParticipant;
+
+public class XSDSearchParticipant extends XMLSearchParticipant {
+
+	private static String ID = "org.eclipse.wst.xsd.search.XSDSearchParticipant";
+
+	public  boolean initialize(SearchPattern pattern, String[] contentTypes){
+		
+		super.initialize(pattern, contentTypes);
+		id = ID;
+		if(pattern instanceof XMLComponentSearchPattern ){
+			XMLComponentSearchPattern componentPattern = (XMLComponentSearchPattern)pattern;
+			String namespace = componentPattern.getMetaName().getNamespace();
+			if(IXSDSearchConstants.XMLSCHEMA_NAMESPACE.equals(namespace)){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	
+	public ComponentSearchContributor getSearchContributor() {
+		
+		return new XSDSearchContributor();
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/BaseCleanup.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/BaseCleanup.java
new file mode 100644
index 0000000..3a3da3b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/BaseCleanup.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDSchema;
+import org.w3c.dom.Element;
+
+public abstract class BaseCleanup extends XSDVisitor
+{
+  /**
+   * @see org.eclipse.wst.xsd.ui.internal.refactor.XSDVisitor#visitSchema(XSDSchema)
+   */
+  public void visitSchema(XSDSchema schema)
+  {
+    super.visitSchema(schema);
+    
+    // now remove all children that were queued up for removal
+    
+    for (Iterator iter = childrenToRemove.iterator(); iter.hasNext(); )
+    {
+      Element domElement = (Element) iter.next();
+      XSDDOMHelper.removeNodeAndWhitespace(domElement);
+//      domElement.getParentNode().removeChild(domElement);
+    }
+  }
+
+
+  protected ArrayList messages = new ArrayList();
+
+  public ArrayList getMessages()
+  {
+  	return messages;
+  }
+  
+
+  protected void addMessage(String msg, XSDConcreteComponent component)
+  {
+////    ErrorMessage message = new ErrorMessage();
+//    
+//    XSDConcreteComponent currComp = component;
+//    while (!(currComp instanceof XSDSchemaContent) && currComp.getContainer() != null)
+//    {
+//      currComp = currComp.getContainer();
+//    }
+//
+//    Element domElement = currComp.getElement();
+//    Node parent = domElement;
+//    while (!(parent instanceof NodeImpl) && parent != null)
+//    {
+//      parent = parent.getParentNode();
+//    }
+//    if (parent instanceof NodeImpl)
+//    {
+//      // message.setModelObject(currComp.getElement());
+//			message.setTargetObject(currComp.getElement());
+//    }
+//    message.setLocalizedMessage(msg);
+//  ???
+//    addMessage(message);
+  }
+    
+
+// // protected void addMessage(ErrorMessage message)
+//	protected void addMessage(Message message)
+//  {
+//    messages.add(message);
+//  }
+  
+
+  protected ArrayList childrenToRemove = new ArrayList();
+  
+
+  protected String getNamedComponentName(XSDConcreteComponent concrete)
+  {
+    String name = null;
+    if (concrete instanceof XSDNamedComponent)
+    {
+      name = ((XSDNamedComponent)concrete).getName();
+    }
+    
+    XSDConcreteComponent comp = concrete;
+    while (comp != null && name == null)
+    {
+      comp = comp.getContainer();
+      if (comp instanceof XSDNamedComponent)
+      {
+        name = ((XSDNamedComponent)comp).getName();
+      }
+    }
+    return name != null ? name : "";
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDExternalFileCleanup.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDExternalFileCleanup.java
new file mode 100644
index 0000000..e96619e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDExternalFileCleanup.java
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.text.MessageFormat;
+import java.util.Iterator;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSchemaContent;
+import org.eclipse.xsd.XSDSchemaDirective;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDConstants;
+import org.w3c.dom.Element;
+
+public class XSDExternalFileCleanup extends BaseCleanup
+{
+  /**
+   * Constructor for XSDExternalFileCleanup.
+   */
+  public XSDExternalFileCleanup(String oldFilename)
+  {
+    super();
+    this.oldFilename = oldFilename;
+  }
+  
+  protected XSDSchema deletedSchema;
+  public XSDExternalFileCleanup(XSDSchema deletedSchema)
+  {
+    this.deletedSchema = deletedSchema;
+  }
+
+  protected String oldFilename;
+  
+  /**
+   * @see org.eclipse.wst.xsd.ui.internal.refactor.XSDVisitor#visitElementDeclaration(XSDElementDeclaration)
+   */
+  public void visitElementDeclaration(XSDElementDeclaration element)
+  {
+    boolean addMessage = true;
+    String schemaLocation = element.getSchema().getSchemaLocation();
+    if (schemaLocation!= null)
+    {
+      if (!schemaLocation.equals(schema.getSchemaLocation()))
+      {
+        addMessage = false;
+      }
+    }
+    if (element.isElementDeclarationReference())
+    {
+      if (isFromDeletedSchema(element.getResolvedElementDeclaration()))
+      {
+        if (addMessage)
+        {
+          // String msg = XSDPlugin.getSchemaString("_INFO_REMOVE_ELEMENT_REFERENCE") + " <" + getNamedComponentName(element.getContainer()) + ">";
+					String msg = "_INFO_REMOVE_ELEMENT_REFERENCE" + " <" + getNamedComponentName(element.getContainer()) + ">";
+          addMessage(msg, element.getContainer());
+        }
+        childrenToRemove.add(element.getElement());
+//        Element domElement = element.getElement();
+//        domElement.getParentNode().removeChild(domElement);     
+      }
+    }
+    else if (removeType(element))
+    {
+      String msg = "";
+      if (element.isGlobal())
+      {
+      	// String pattern = XSDPlugin.getSchemaString("_INFO_RESET_GLOBAL_ELEMENT");
+				String pattern = "_INFO_RESET_GLOBAL_ELEMENT";
+        Object args[] = {element.getName()};
+        msg = MessageFormat.format(pattern, args);
+      }
+      else
+      {
+      	// msg = XSDPlugin.getSchemaString("_INFO_RESET_ELEMENT");
+				msg = "_INFO_RESET_ELEMENT";
+      	// msg += "<" + element.getName() + "> " + XSDPlugin.getSchemaString("_UI_TO_TYPE_STRING");
+				msg += "<" + element.getName() + "> " + "_UI_TO_TYPE_STRING";
+      }
+      if (addMessage)
+      {
+        addMessage(msg, element);
+      }
+    }
+
+
+    super.visitElementDeclaration(element);
+  }
+
+  protected void resetTypeToString(Element element)
+  {
+    String prefix = element.getPrefix();
+    prefix = (prefix == null) ? "" : (prefix + ":");
+    
+    element.setAttribute(XSDConstants.TYPE_ATTRIBUTE, prefix + "string"); 
+  }
+  
+  protected boolean removeType(XSDElementDeclaration element)
+  {
+  	if (removeType(element.getTypeDefinition()))
+  	{
+      resetTypeToString(element.getElement());
+  	  return true;
+  	}
+  	return false;
+  }
+  
+  protected boolean isFromDeletedSchema(XSDConcreteComponent component)
+  {
+    if (component == null)
+    {
+      return false;
+    }
+    XSDConcreteComponent root = component.getRootContainer();
+
+    boolean isFromDeletedSchema = false;
+    if (deletedSchema.getContents() != null)
+    {
+      Iterator contents = deletedSchema.getContents().iterator();
+      while (contents.hasNext())
+      {
+        XSDSchemaContent content = (XSDSchemaContent)contents.next();
+        if (content instanceof XSDSchemaDirective)
+        {
+          XSDSchema aSchema = ((XSDSchemaDirective)content).getResolvedSchema();
+          if (root != null && root.equals(aSchema))
+          {
+            isFromDeletedSchema = true;
+          }
+        }
+      }
+    }
+    if (root != null && root.equals(deletedSchema))
+    {
+      isFromDeletedSchema = true;
+    }
+    return isFromDeletedSchema;
+  }
+      
+  /**
+   * Remove the type from the element if it belongs to the external file
+   */
+  protected boolean removeType(XSDTypeDefinition typeDef)
+  {
+    if (typeDef == null)
+    {
+      return false;
+    }
+    return isFromDeletedSchema(typeDef);
+  }
+
+  /**
+   * @see org.eclipse.wst.xsd.utility.XSDVisitor#visitComplexTypeDefinition(XSDComplexTypeDefinition)
+   */
+  public void visitComplexTypeDefinition(XSDComplexTypeDefinition type)
+  {
+    super.visitComplexTypeDefinition(type);
+    if (type.getAttributeContents() != null)
+    {
+      for (Iterator iter = type.getAttributeContents().iterator(); iter.hasNext(); )
+      {
+        XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent) iter.next();
+        if (attrGroupContent instanceof XSDAttributeUse)
+        {
+          XSDAttributeUse attrUse = (XSDAttributeUse) attrGroupContent;
+          XSDAttributeDeclaration attrDecl = attrUse.getContent();
+          
+          // now is this a reference?
+          if (attrDecl.isAttributeDeclarationReference())
+          {
+            if (isFromDeletedSchema(attrDecl.getResolvedAttributeDeclaration()))
+            {
+              String name = getNamedComponentName(type);
+              // String msg = XSDPlugin.getSchemaString("_INFO_REMOVE_ATTRIBUTE_REFERENCE") +
+							String msg = "_INFO_REMOVE_ATTRIBUTE_REFERENCE" +
+                       " <" + name + ">";
+              addMessage(msg, attrDecl.getContainer());
+              
+              childrenToRemove.add(attrDecl.getElement());
+            }
+          }
+          // otherwise check the type of the attribute and see if it is from the deleted schema
+          else
+          {
+            if (removeType(attrDecl.getTypeDefinition()))
+            {
+              // reset the type of the attribute decl to string
+              // String msg = XSDPlugin.getSchemaString("_INFO_RESET_ATTRIBUTE") +
+							String msg = "_INFO_RESET_ATTRIBUTE" +
+                          " <" + attrDecl.getName() + "> " +
+                          // XSDPlugin.getSchemaString("_UI_TO_TYPE_STRING");
+							            "_UI_TO_TYPE_STRING";
+              addMessage(msg, attrDecl);
+              resetTypeToString(attrDecl.getElement());
+
+            }
+          }
+        }
+        else if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+        {
+          XSDAttributeGroupDefinition attrGroupDef = (XSDAttributeGroupDefinition) attrGroupContent;
+          
+          if (isFromDeletedSchema(attrGroupDef.getResolvedAttributeGroupDefinition()))
+          {
+          	// remove the attribute group reference
+            String name = getNamedComponentName(type);
+            // String msg = XSDPlugin.getSchemaString("_INFO_REMOVE_ATTRIBUTE_GROUP_REFERENCE") + " <" + name + ">";
+						String msg = "_INFO_REMOVE_ATTRIBUTE_GROUP_REFERENCE" + " <" + name + ">";
+
+            addMessage(msg, attrGroupDef.getContainer());
+            
+            childrenToRemove.add(attrGroupDef.getElement());
+          }
+        }
+      }
+    }
+
+    // For the complex type with simple content case, see the visitComplexTypeDefinition method
+    XSDTypeDefinition base = type.getBaseTypeDefinition();
+    if (base instanceof XSDSimpleTypeDefinition)
+    {
+      XSDSimpleTypeDefinition baseType = (XSDSimpleTypeDefinition)base;
+      if (isFromDeletedSchema(baseType))
+      {
+        // String msg = XSDPlugin.getSchemaString("_INFO_RESET_COMPLEX_TYPE") +
+				String msg = "_INFO_RESET_COMPLEX_TYPE" +
+                " <" + getNamedComponentName(type) + "> " +
+                // XSDPlugin.getSchemaString("_UI_DERIVATION");
+				        "_UI_DERIVATION";
+        addMessage(msg, type);
+      
+        type.setBaseTypeDefinition(schema.getSchemaForSchema().resolveSimpleTypeDefinition("string"));
+      }
+    }
+  }
+
+  /**
+   * @see org.eclipse.wst.xsd.utility.XSDVisitor#visitModelGroupDefinition(XSDModelGroupDefinition)
+   */
+  public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroup)
+  {
+    super.visitModelGroupDefinition(modelGroup);
+    if (modelGroup.isModelGroupDefinitionReference())
+    {
+      if (isFromDeletedSchema(modelGroup.getResolvedModelGroupDefinition()))
+      {
+        String name = getNamedComponentName(modelGroup);
+        // String msg = XSDPlugin.getSchemaString("_INFO_REMOVE_GROUP_REFERENCE") + " <" + name + ">";
+				String msg = "_INFO_REMOVE_GROUP_REFERENCE" + " <" + name + ">";
+        addMessage(msg, modelGroup.getContainer());
+        childrenToRemove.add(modelGroup.getElement());
+      }
+    }      
+  }
+
+  /**
+   * @see org.eclipse.wst.xsd.utility.XSDVisitor#visitSimpleTypeDefinition(XSDSimpleTypeDefinition)
+   */
+  public void visitSimpleTypeDefinition(XSDSimpleTypeDefinition type)
+  {
+    super.visitSimpleTypeDefinition(type);
+    XSDSimpleTypeDefinition baseType = type.getBaseTypeDefinition();
+    if (isFromDeletedSchema(baseType))
+    {
+      // String msg = XSDPlugin.getSchemaString("_INFO_RESET_SIMPLE_TYPE") +
+			String msg = "_INFO_RESET_SIMPLE_TYPE" +
+              " <" + getNamedComponentName(type) + "> " +
+              // XSDPlugin.getSchemaString("_UI_DERIVATION");
+			        "_UI_DERIVATION";
+      addMessage(msg, type);
+      
+
+    // This will set the simple Type base to string 
+    // For the complex type with simple content case, see the visitComplexTypeDefinition method
+
+      type.getFacetContents().clear();
+      type.getFacets().clear();
+      type.setBaseTypeDefinition(schema.getSchemaForSchema().resolveSimpleTypeDefinition("string"));
+    }
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDVisitor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDVisitor.java
new file mode 100644
index 0000000..4acf32d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDVisitor.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.refactor.rename;
+
+import java.util.Iterator;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeContent;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDIdentityConstraintDefinition;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDNotationDeclaration;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.XSDWildcard;
+
+public class XSDVisitor
+{
+  public XSDVisitor()
+  {
+  }
+  
+  protected XSDSchema schema;
+  
+  public void visitSchema(XSDSchema schema)
+  {
+    this.schema = schema;
+    for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDAttributeDeclaration attr = (XSDAttributeDeclaration) iterator.next();
+      visitAttributeDeclaration(attr);
+    }
+    for (Iterator iterator = schema.getTypeDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDTypeDefinition type = (XSDTypeDefinition) iterator.next();
+      visitTypeDefinition(type);
+    }
+    for (Iterator iterator = schema.getElementDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDElementDeclaration element = (XSDElementDeclaration) iterator.next();
+      visitElementDeclaration(element);
+    }
+    for (Iterator iterator = schema.getIdentityConstraintDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDIdentityConstraintDefinition identityConstraint = (XSDIdentityConstraintDefinition) iterator.next();
+      visitIdentityConstraintDefinition(identityConstraint);
+    }
+    for (Iterator iterator = schema.getModelGroupDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDModelGroupDefinition modelGroup = (XSDModelGroupDefinition) iterator.next();
+      visitModelGroupDefinition(modelGroup);
+    }
+    for (Iterator iterator = schema.getAttributeGroupDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDAttributeGroupDefinition attributeGroup = (XSDAttributeGroupDefinition) iterator.next();
+      visitAttributeGroupDefinition(attributeGroup);
+    }
+    for (Iterator iterator = schema.getNotationDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDNotationDeclaration element = (XSDNotationDeclaration) iterator.next();
+      visitNotationDeclaration(element);
+    }
+    
+  }
+  
+  public void visitAttributeDeclaration(XSDAttributeDeclaration attr)
+  {
+  }
+  
+  public void visitTypeDefinition(XSDTypeDefinition type)
+  {
+    if (type instanceof XSDSimpleTypeDefinition)
+    {
+      visitSimpleTypeDefinition((XSDSimpleTypeDefinition)type);
+    }
+    else if (type instanceof XSDComplexTypeDefinition)
+    {
+      visitComplexTypeDefinition((XSDComplexTypeDefinition)type);
+    }
+  }
+  
+  public void visitElementDeclaration(XSDElementDeclaration element)
+  {
+    if (element.isElementDeclarationReference())
+    {
+    }
+    else if (element.getAnonymousTypeDefinition() != null)
+    {
+      visitTypeDefinition(element.getAnonymousTypeDefinition());
+    }
+  }
+  
+  public void visitIdentityConstraintDefinition(XSDIdentityConstraintDefinition identityConstraint)
+  {
+  }
+  
+  public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroupDef)
+  {
+    if (!modelGroupDef.isModelGroupDefinitionReference())
+    {
+      if (modelGroupDef.getModelGroup() != null)
+      {
+        visitModelGroup(modelGroupDef.getModelGroup());
+      }
+    }
+  }
+  
+  public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup)
+  {
+    if (attributeGroup.getAttributeUses() != null)
+    {
+      for (Iterator iter = attributeGroup.getAttributeUses().iterator(); iter.hasNext(); )
+      {
+        XSDAttributeUse attrUse = (XSDAttributeUse)iter.next();
+        visitAttributeDeclaration(attrUse.getContent());
+      }
+    }
+  }
+  
+  public void visitNotationDeclaration(XSDNotationDeclaration notation)
+  {
+  }
+  
+  public void visitSimpleTypeDefinition(XSDSimpleTypeDefinition type)
+  {
+  }
+  
+  public void visitComplexTypeDefinition(XSDComplexTypeDefinition type)
+  {
+    if (type.getContentType() != null)
+    {
+      XSDComplexTypeContent complexContent = (XSDComplexTypeContent) type.getContentType();
+      if (complexContent instanceof XSDSimpleTypeDefinition)
+      {
+        visitSimpleTypeDefinition((XSDSimpleTypeDefinition)complexContent);
+      }
+      else if (complexContent instanceof XSDParticle)
+      {
+        visitParticle((XSDParticle) complexContent);
+      }
+    }
+    
+    if (type.getAttributeContents() != null)
+    {
+      for (Iterator iter = type.getAttributeContents().iterator(); iter.hasNext(); )
+      {
+        XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent)iter.next();
+        if (attrGroupContent instanceof XSDAttributeUse)
+        {
+          XSDAttributeUse attrUse = (XSDAttributeUse)attrGroupContent;
+          visitAttributeDeclaration(attrUse.getContent());
+        }
+        else if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+        {
+          visitAttributeGroupDefinition((XSDAttributeGroupDefinition)attrGroupContent);
+        }
+      }
+    }
+  }
+  
+  public void visitParticle(XSDParticle particle)
+  {
+    visitParticleContent(particle.getContent());
+  }
+  
+  public void visitParticleContent(XSDParticleContent particleContent)
+  {
+    if (particleContent instanceof XSDModelGroupDefinition)
+    {
+      visitModelGroupDefinition((XSDModelGroupDefinition) particleContent);
+    }
+    else if (particleContent instanceof XSDModelGroup)
+    {
+      visitModelGroup((XSDModelGroup)particleContent);
+    }
+    else if (particleContent instanceof XSDElementDeclaration)
+    {
+      visitElementDeclaration((XSDElementDeclaration)particleContent);
+    }
+    else if (particleContent instanceof XSDWildcard)
+    {
+      visitWildcard((XSDWildcard)particleContent);
+    }
+  }
+  
+  public void visitModelGroup(XSDModelGroup modelGroup)
+  {
+    if (modelGroup.getContents() != null)
+    {
+      for (Iterator iterator = modelGroup.getContents().iterator(); iterator.hasNext();)
+      {
+        XSDParticle particle = (XSDParticle) iterator.next();
+        visitParticle(particle);
+      }
+    }
+  }
+  
+  public void visitWildcard(XSDWildcard wildcard)
+  {
+  }
+}
diff --git a/development/org.eclipse.wst.sse.unittests/.classpath b/development/org.eclipse.wst.sse.unittests/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/development/org.eclipse.wst.sse.unittests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/development/org.eclipse.wst.sse.unittests/.cvsignore b/development/org.eclipse.wst.sse.unittests/.cvsignore
deleted file mode 100644
index a37b9c5..0000000
--- a/development/org.eclipse.wst.sse.unittests/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-build.properties
-build.xml
-ssejunit.jar
-temp.folder
diff --git a/development/org.eclipse.wst.sse.unittests/.project b/development/org.eclipse.wst.sse.unittests/.project
deleted file mode 100644
index e6f5109..0000000
--- a/development/org.eclipse.wst.sse.unittests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.wst.sse.unittests</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
diff --git a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs b/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 498dec4..0000000
--- a/development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri May 27 23:41:23 EDT 2005
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF b/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF
deleted file mode 100644
index 20c3b77..0000000
--- a/development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,37 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Unittests
-Bundle-SymbolicName: org.eclipse.wst.sse.unittests; singleton:=true
-Bundle-Version: 0.7.0
-Bundle-ClassPath: sseunittests.jar
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.sse.unittests
-Require-Bundle: org.junit,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.jst.jsp.core.tests,
- org.eclipse.jst.jsp.tests.encoding,
- org.eclipse.jst.jsp.ui.tests,
- org.eclipse.jst.jsp.ui.tests.performance,
- org.eclipse.wst.css.core.tests,
- org.eclipse.wst.css.tests.encoding,
- org.eclipse.wst.css.ui.tests.performance,
- org.eclipse.wst.dtd.ui.tests,
- org.eclipse.wst.html.core.tests,
- org.eclipse.wst.html.tests.encoding,
- org.eclipse.wst.html.ui.tests,
- org.eclipse.wst.html.ui.tests.performance,
- org.eclipse.wst.sse.core.tests,
- org.eclipse.wst.sse.ui.tests,
- org.eclipse.wst.sse.ui.tests.performance,
- org.eclipse.wst.xml.core.tests,
- org.eclipse.wst.xml.tests.encoding,
- org.eclipse.wst.xml.ui.tests,
- org.eclipse.wst.xml.ui.tests.performance,
- org.eclipse.wst.xml.validation.tests,
- org.eclipse.wst.xml.ui,
- org.eclipse.wst.javascript.ui,
- org.eclipse.wst.xsd.validation.tests,
- org.eclipse.wst.css.ui.tests,
- org.eclipse.wst.sse.ui
diff --git a/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif b/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif
deleted file mode 100644
index 75ebdb8..0000000
--- a/development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/development/org.eclipse.wst.sse.unittests/plugin.xml b/development/org.eclipse.wst.sse.unittests/plugin.xml
deleted file mode 100644
index c869906..0000000
--- a/development/org.eclipse.wst.sse.unittests/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-        <extension point="org.eclipse.ui.editors">
-                <editor
-                        name="%XML_Source_Page_Editor.name"
-                        icon="icons/sourceEditor.gif"
-                        contributorClass="org.eclipse.wst.xml.ui.internal.actions.ActionContributorXML"
-                        class="org.eclipse.wst.sse.ui.StructuredTextEditor"
-                        symbolicFontName="org.eclipse.wst.sse.ui.textfont"
-                        id="org.eclipse.core.runtime.xml.source">
-                        <contentTypeBinding
-                                contentTypeId="org.eclipse.core.runtime.xml" />
-                        <contentTypeBinding
-                                contentTypeId="org.eclipse.wst.xml.core.xmlsource" />
-                </editor>
-        </extension>
-        	<extension point="org.eclipse.ui.editors">
-		<editor
-			name="%JavaScript_Source_Page_Editor.name"
-			icon="icons/sourceEditor.gif"
-			extensions="js"
-			contributorClass="org.eclipse.wst.javascript.ui.internal.actions.ActionContributorJS"
-			class="org.eclipse.wst.javascript.ui.internal.editor.JSEditor"
-			symbolicFontName="org.eclipse.wst.sse.ui.textfont"
-			id="org.eclipse.wst.javascript.core.javascriptsource.source">
-			<contentTypeBinding
-				contentTypeId="org.eclipse.wst.javascript.core.javascriptsource" />
-		</editor>
-	</extension>
-</plugin>
\ No newline at end of file
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java
deleted file mode 100644
index a2ea5b3..0000000
--- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.sse.unittests;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.jsp.core.tests.JSPCoreTestSuite;
-import org.eclipse.jst.jsp.tests.encoding.JSPEncodingTestSuite;
-import org.eclipse.jst.jsp.ui.tests.JSPUITestSuite;
-import org.eclipse.wst.css.core.tests.CSSCoreTestSuite;
-import org.eclipse.wst.css.tests.encoding.CSSEncodingTestSuite;
-import org.eclipse.wst.css.ui.tests.CSSUITestSuite;
-import org.eclipse.wst.dtd.ui.tests.DTDUITestSuite;
-import org.eclipse.wst.html.core.tests.HTMLCoreTestSuite;
-import org.eclipse.wst.html.tests.encoding.HTMLEncodingTestSuite;
-import org.eclipse.wst.html.ui.tests.HTMLUITestSuite;
-import org.eclipse.wst.sse.core.tests.SSEModelTestSuite;
-import org.eclipse.wst.sse.ui.tests.SSEUITestSuite;
-import org.eclipse.wst.xml.core.tests.SSEModelXMLTestSuite;
-import org.eclipse.wst.xml.tests.encoding.EncodingTestSuite;
-import org.eclipse.wst.xml.ui.tests.XMLUITestSuite;
-import org.eclipse.wst.xml.validation.tests.internal.AllXMLTests;
-import org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests;
-
-/*****************************************************************************
- * Copyright (c) 2004 IBM Corporation and others. 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: IBM Corporation - initial API and implementation
- * 
- ****************************************************************************/
-
-public class MasterListTestSuite extends TestSuite {
-
-	public MasterListTestSuite() {
-		super("All Tests");
-		
-		System.setProperty("wtp.autotest.noninteractive", "true");
-
-		addTest(SSEModelTestSuite.suite());
-		addTest(SSEModelXMLTestSuite.suite());
-		addTest(CSSCoreTestSuite.suite());
-		addTest(HTMLCoreTestSuite.suite());
-		addTest(JSPCoreTestSuite.suite());
-
-		addTest(AllXMLTests.suite());
-		
-		addTest(EncodingTestSuite.suite());
-		addTest(CSSEncodingTestSuite.suite());
-		addTest(HTMLEncodingTestSuite.suite());
-		addTest(JSPEncodingTestSuite.suite());
-
-		addTest(CSSUITestSuite.suite());
-		addTest(HTMLUITestSuite.suite());
-		addTest(SSEUITestSuite.suite());
-		addTest(XMLUITestSuite.suite());
-		addTest(DTDUITestSuite.suite());
-		addTest(JSPUITestSuite.suite());
-		
-		addTest(AllXSDTests.suite());
-		//addTest(RegressionBucket.suite());
-		//addTest(AllTestCases.suite());
-
-	}
-
-	public void testAll() {
-		// this method needs to exist, but doesn't really do anything
-		// other than to signal to create an instance of this class.
-		// The rest it automatic from the tests added in constructor. 
-	}
-}
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterPerformanceTestSuite.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterPerformanceTestSuite.java
deleted file mode 100644
index 8491014..0000000
--- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterPerformanceTestSuite.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *     
- *******************************************************************************/
-
-package org.eclipse.wst.sse.unittests;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.jsp.ui.tests.performance.JSPUIPerformanceTests;
-import org.eclipse.wst.css.ui.tests.performance.CSSUIPerformanceTestSuite;
-import org.eclipse.wst.html.ui.tests.performance.HTMLUIPerformanceTestSuite;
-import org.eclipse.wst.sse.ui.tests.performance.SSEUIPerformanceTestSuite;
-import org.eclipse.wst.xml.ui.tests.performance.XMLUIPerformanceTestSuite;
-
-/*****************************************************************************
- * Copyright (c) 2004 IBM Corporation and others. 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: IBM Corporation - initial API and implementation
- * 
- ****************************************************************************/
-
-public class MasterPerformanceTestSuite extends TestSuite {
-
-	public MasterPerformanceTestSuite() {
-		super("All Tests");
-
-		addTest(JSPUIPerformanceTests.suite());
-		addTest(CSSUIPerformanceTestSuite.suite());
-		addTest(HTMLUIPerformanceTestSuite.suite());
-		addTest(SSEUIPerformanceTestSuite.suite());
-		addTest(XMLUIPerformanceTestSuite.suite());
-
-
-	}
-
-	public void testAll() {
-		// this method needs to exist, but doesn't really do anything
-	}
-
-}
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java
deleted file mode 100644
index 300d5e5..0000000
--- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.sse.unittests.minortools;
-
-
-
-public class TestStringUtils {
-
-	/**
-	 * TestStringUtils constructor comment.
-	 */
-	private TestStringUtils() {
-		super();
-	}
-
-	/**
-	 * Replace matching literal portions of a string with another string
-	 */
-	public static String replace(String aString, String source, String target) {
-		if (aString == null)
-			return null;
-		String normalString = ""; //$NON-NLS-1$
-		int length = aString.length();
-		int position = 0;
-		int previous = 0;
-		int spacer = source.length();
-		while (position + spacer - 1 < length && aString.indexOf(source, position) > -1) {
-			position = aString.indexOf(source, previous);
-			normalString = normalString + aString.substring(previous, position) + target;
-			position += spacer;
-			previous = position;
-		}
-		normalString = normalString + aString.substring(position, aString.length());
-
-		return normalString;
-	}
-
-}
\ No newline at end of file
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java
deleted file mode 100644
index 811a668..0000000
--- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.sse.unittests.minortools;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.eclipse.wst.xml.core.tests.util.CommonXML;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-
-
-/**
- * Modifies plugin.xml and fragment.xml files to not require specific versions
- * of their plugin dependencies.
- * 
- * @author nitin
- */
-public class VersionRemover {
-
-	char[] charbuff = new char[2048];
-	StringBuffer s = null;
-
-	public VersionRemover() {
-		super();
-	}
-
-
-
-	public static void main(String[] args) {
-		if (args.length < 1)
-			new VersionRemover().visit(new File("d:/target"));
-		else
-			new VersionRemover().visit(new File(args[0]));
-	}
-
-
-
-	protected void visit(File file) {
-		// Skip directories like org.eclipse.*, org.apache.*, and org.junit.*
-		if (file.isDirectory() && !file.getName().startsWith("org.eclipse.") && !file.getName().startsWith("org.apache") && !file.getName().startsWith("org.junit")) {
-			String[] contents = file.list();
-			for (int i = 0; i < contents.length; i++)
-				visit(new File(file.getAbsolutePath() + '/' + contents[i]));
-		}
-		else {
-			fixupFile(file);
-		}
-	}
-
-	protected void fixupFile(File file) {
-		// only load and fixup files named plugin.xml or fragment.xml under eclipse\plugins\XXXXXXX.*
-		if (!(file.getName().equalsIgnoreCase("plugin.xml") || file.getName().equalsIgnoreCase("fragment.xml")) || file.getAbsolutePath().indexOf("eclipse\\plugins\\XXXXXXX.") == -1)
-			return;
-		//		System.out.println(file.getAbsolutePath());
-		try {
-			Document doc = CommonXML.getDocumentBuilder().parse(file);
-			NodeList imports = null;
-			if (file.getName().equalsIgnoreCase("plugin.xml"))
-				imports = doc.getElementsByTagName("import");
-			else if (file.getName().equalsIgnoreCase("fragment.xml"))
-				imports = doc.getElementsByTagName("fragment");
-			boolean changed = false;
-			for (int i = 0; i < imports.getLength(); i++) {
-				Node importNode = imports.item(i);
-				if (importNode.getNodeName().equalsIgnoreCase("import") && importNode.getAttributes().getNamedItem("version") != null) {
-					changed = true;
-					importNode.getAttributes().removeNamedItem("version");
-				}
-				if (importNode.getAttributes().getNamedItem("plugin-version") != null) {
-					changed = true;
-					importNode.getAttributes().removeNamedItem("plugin-version");
-				}
-				if (importNode.getAttributes().getNamedItem("match") != null) {
-					importNode.getAttributes().removeNamedItem("match");
-					changed = true;
-				}
-			}
-			if (changed) {
-				FileOutputStream ostream = new FileOutputStream(file.getAbsolutePath());
-				CommonXML.serialize(doc, ostream);
-				ostream.close();
-				System.out.println("Modified " + file.getAbsolutePath());
-			}
-		}
-		catch (SAXException e) {
-			System.err.println(file.getPath() + ": " + e);
-		}
-		catch (IOException e) {
-			System.err.println(file.getPath() + ": " + e);
-		}
-	}
-}
\ No newline at end of file
diff --git a/docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts.xml b/docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts.xml
index 3abddee..bac1fef 100644
--- a/docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts.xml
+++ b/docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts.xml
@@ -22,13 +22,13 @@
 </context>
 
 <context id="jspr0010">
-<description>Select this option to open the <b>Refactor Rename</b> dialog, if applicable, which lets you rename the currently selected Java element and references to that element.
+<description>Select this option to open the <b>Rename Resource</b> dialog, if applicable, which lets you rename the currently selected Java element and references to that element.
 </description>
 <topic label="Source editors for markup languages" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt004.html"/>
 <topic label="Editing source code - overview" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt000.html"/>
 </context>
 <context id="jspr0020">
-<description>Select this option to open the <b>Refactor Move</b> dialog, if applicable, which lets you move the currently selected Java element. For example, you can move a method from one class to another.
+<description>Select this option to open the <b>Move</b> dialog, if applicable, which lets you move the currently selected Java element. For example, you can move a method from one class to another.
 </description>
 <topic label="Source editors for markup languages" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt004.html"/>
 <topic label="Editing source code - overview" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt000.html"/>
diff --git a/docs/org.eclipse.jst.jsp.ui.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.jst.jsp.ui.infopop/META-INF/MANIFEST.MF
index 6f869a8..57c07b0 100644
--- a/docs/org.eclipse.jst.jsp.ui.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.jst.jsp.ui.infopop/META-INF/MANIFEST.MF
@@ -2,7 +2,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.jst.jsp.ui.infopop; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Eclipse.org
+Bundle-Version: 1.0.2.qualifier
+Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: plugin
-Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.jst.jsp.ui.infopop/build.properties b/docs/org.eclipse.jst.jsp.ui.infopop/build.properties
index ce4c693..33cb6c7 100644
--- a/docs/org.eclipse.jst.jsp.ui.infopop/build.properties
+++ b/docs/org.eclipse.jst.jsp.ui.infopop/build.properties
@@ -2,13 +2,12 @@
                EditorJspContexts2.xml,\
                about.html,\
                plugin.xml,\
-               META-INF,\
-               /,\
+               META-INF/,\
                META-INF/,\
                EditorJspContexts2.xml,\
                EditorJspContexts.xml,\
                about.html,\
                plugin.properties,\
-               plugin.xml
-               plugin.properties/
+               plugin.xml,\
+               plugin.properties
 src.includes = build.properties
diff --git a/docs/org.eclipse.jst.jsp.ui.infopop/plugin.properties b/docs/org.eclipse.jst.jsp.ui.infopop/plugin.properties
index fc2e115..138c44e 100644
--- a/docs/org.eclipse.jst.jsp.ui.infopop/plugin.properties
+++ b/docs/org.eclipse.jst.jsp.ui.infopop/plugin.properties
@@ -3,3 +3,5 @@
 # Translation Instruction: section to be translated
 # ==============================================================================
 Plugin.name = JSP tools infopops
+
+Bundle-Vendor.0 = Eclipse.org
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.doc.user/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.doc.user/META-INF/MANIFEST.MF
index 0e4b207..33c30e1 100644
--- a/docs/org.eclipse.wst.doc.user/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.doc.user/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: master user doc toc
+Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.doc.user; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.doc.user/plugin.properties b/docs/org.eclipse.wst.doc.user/plugin.properties
index 2e49616..6163b89 100644
--- a/docs/org.eclipse.wst.doc.user/plugin.properties
+++ b/docs/org.eclipse.wst.doc.user/plugin.properties
@@ -8,4 +8,6 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-providerName=Eclipse.org
+
+pluginName   = Master User Doc TOC
+providerName = Eclipse.org
diff --git a/docs/org.eclipse.wst.doc.user/toc.xml b/docs/org.eclipse.wst.doc.user/toc.xml
index aee7225..84f6f6c 100644
--- a/docs/org.eclipse.wst.doc.user/toc.xml
+++ b/docs/org.eclipse.wst.doc.user/toc.xml
@@ -39,18 +39,15 @@
 		<link toc="../org.eclipse.jst.ws.doc.user/webservice_toc.xml" />
 	</topic>
 	<topic label="Using data tools">
-		<link
-			toc="../org.eclipse.wst.datatools.connection.ui.doc.user/connection_ui_toc.xml" />
-		<link
-			toc="../org.eclipse.wst.datatools.fe.ui.doc.user/fe_ui_toc.xml" />
 		<link toc="../org.eclipse.wst.datatools.server.ui.doc.user/database_explorer_toc.xml" />
-		<link toc="../org.eclipse.wst.datatools.outputview.ui.doc.user/dataoutput_view_toc.xml" />
+		<link toc="../org.eclipse.wst.datatools.server.ui.doc.user/dataoutput_view_toc.xml" />
+		<link toc="../org.eclipse.wst.datatools.connection.ui.doc.user/connection_ui_toc.xml" />
+		<link toc="../org.eclipse.wst.datatools.fe.ui.doc.user/fe_ui_toc.xml" />
 		<link toc="../org.eclipse.wst.datatools.data.ui.doc.user/data_ui_toc.xml" />
 		<link toc="../org.eclipse.wst.sqleditor.doc.user/sqleditor_toc.xml" />
 	</topic>
 	<topic label="Using the server tools">
-		<link toc="../org.eclipse.wst.server.ui.doc.user/build_toc.xml" />
-		<link toc="../org.eclipse.jst.server.ui.doc.user/build_toc.xml" />
+  		<link toc="../org.eclipse.wst.server.ui.doc.user/wtp_main_toc.xml" />
 	</topic>
 	<topic label="Legal" href="notices.html" />
 </toc>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts.xml b/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts.xml
index ecb3e57..0cf4da1 100644
--- a/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts.xml
+++ b/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts.xml
@@ -13,51 +13,42 @@
  *******************************************************************************/ -->
 
 <contexts>
-	<context id="csh_outer_container">
-		<description/>
-	</context>
-	<context id="webx0020">
-		<description>
-			This page lets you specify the line delimiter and the text encoding that will be used when you create or save a document type definition (DTD) file.
+<context id="csh_outer_container">
+<description/>
+</context>
+<context id="webx0020">
+<description>This page lets you specify the line delimiter and the text encoding that will be used when you create or save a document type definition (DTD) file.
 
-			The line delimiters are Ctrl-J (UNIX), Ctrl-M (Mac), or Ctrl-M Ctrl-J (Windows).
-		</description>
-	</context>
-	<context id="webx0021">
-		<description>
-			This page lets you customize the syntax highlighting that the document type definition (DTD) editor does when you are editing a file.
+The line delimiters are Ctrl-J (UNIX), Ctrl-M (Mac), or Ctrl-M Ctrl-J (Windows).</description>
+</context>
+<context id="webx0021">
+<description>This page lets you customize the syntax highlighting that the document type definition (DTD) editor does when you are editing a file.
 
-			The <b>Content type</b> field contains a list of all the source types that you can select a highlighting style for. You can either select the content type that you want to work with from the drop-down list, or click text in the text sample window that corresponds to the content type for which you want to change the text highlighting.
+The <b>Content type</b> field contains a list of all the source types that you can select a highlighting style for. You can either select the content type that you want to work with from the drop-down list, or click text in the text sample window that corresponds to the content type for which you want to change the text highlighting.
 
-			The <b>Foreground</b> and <b>Background</b> push buttons open <b>Color</b> dialog boxes that allow you to specify text foreground and background colors, respectively. Select the <b>Bold</b> check box to make the specified content type appear in bold.
+The <b>Foreground</b> and <b>Background</b> push buttons open <b>Color</b> dialog boxes that allow you to specify text foreground and background colors, respectively. Select the <b>Bold</b> check box to make the specified content type appear in bold.
 
-			Click the <b>Restore Default</b> push button to set the highlighting styles back to their default values.
-		</description>
-		<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tedtsrcst.html" label="Setting source highlighting styles"/>
-	</context>
-	<context id="webx0022">
-		<description>
-			Templates are a chunk of predefined code that you can insert into a DTD file when it is created.
+Click the <b>Restore Default</b> push button to set the highlighting styles back to their default values.</description>
+<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tedtsrcst.html" label="Setting source highlighting styles"/>
+</context>
+<context id="webx0022">
+<description>Templates are a chunk of predefined code that you can insert into a DTD file when it is created.
 
-			Click <b>New</b> if you want to create a completely new template.
+Click <b>New</b> if you want to create a completely new template.
 
-			Supply a new template <b>Name</b> and <b>Description</b>. The <b>Context</b> for the template is the context in which the template is available in the proposal list when content assist is requested. Specify the <b>Pattern</b> for your template using the appropriate tags, attributes, or attribute values to be inserted by content assist.
+Supply a new template <b>Name</b> and <b>Description</b>. The <b>Context</b> for the template is the context in which the template is available in the proposal list when content assist is requested. Specify the <b>Pattern</b> for your template using the appropriate tags, attributes, or attribute values to be inserted by content assist.
 
-			If you want to insert a variable, click the <b>Insert Variable</b> button and select the variable to be inserted. For example, the <b>date</b> variable indicates the current date will be inserted.
+If you want to insert a variable, click the <b>Insert Variable</b> button and select the variable to be inserted. For example, the <b>date</b> variable indicates the current date will be inserted.
 
-			You can edit, remove, import, or export a template by using the same Preferences page.
+You can edit, remove, import, or export a template by using the same Preferences page.
 
-			If you have a template that you do not want to remove but you no longer want it to appear in the content assist list, clear its check box in the <b>Templates</b> preferences page.
-
-		</description>
-		<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.html" label="Working with DTD templates"/>
-		<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.html" label="Creating DTD files"/>
-	</context>
-	<context id="dtdw0010">
-		<description>
-			Click the <b>Use DTD Template</b> check box if you want to use a DTD template as the initial content in your new DTD page. A list of available DTD templates is listed - select the one you want to use. A preview of your DTD file is shown once you select a DTD template.
-		</description>
-		<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.html" label="Working with DTD templates"/>
-		<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.html" label="Creating DTD files"/>
-	</context>
+If you have a template that you do not want to remove but you no longer want it to appear in the content assist list, clear its check box in the <b>Templates</b> preferences page.</description>
+<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.html" label="Working with DTD templates"/>
+<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.html" label="Creating DTD files"/>
+</context>
+<context id="dtdw0010">
+<description>Click the <b>Use DTD Template</b> check box if you want to use a DTD template as the initial content in your new DTD page. A list of available DTD templates is listed - select the one you want to use. A preview of your DTD file is shown once you select a DTD template.</description>
+<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.html" label="Working with DTD templates"/>
+<topic href="../org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.html" label="Creating DTD files"/>
+</context>
 </contexts>
diff --git a/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts2.xml b/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts2.xml
index f8e6f83..3a44d26 100644
--- a/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts2.xml
+++ b/docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts2.xml
@@ -13,14 +13,13 @@
  *******************************************************************************/ -->
 
 <contexts>
-	<context id="csh_outer_container">
-		<description/>
-	</context>
-	<context id="dtdsource_source_HelpId">
-		<description>
-			The DTD editor lets you edit a document type definition.
+<context id="csh_outer_container">
+<description/>
+</context>
+<context id="dtdsource_source_HelpId">
+<description>The DTD editor lets you edit a document type definition.
 
-			The editor provides text editing features such as syntax highlighting and unlimited undo and redo.
-		</description>
-	</context>
+The editor provides text editing features such as syntax highlighting and unlimited undo and redo.
+</description>
+</context>
 </contexts>
diff --git a/docs/org.eclipse.wst.dtd.ui.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.dtd.ui.infopop/META-INF/MANIFEST.MF
index 84f7de6..b7ecc4e 100644
--- a/docs/org.eclipse.wst.dtd.ui.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.dtd.ui.infopop/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: DTD infopops
+Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtd.ui.infopop; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Eclipse.org
+Bundle-Version: 1.0.1.qualifier
+Bundle-Vendor: %pluginProvider
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.dtd.ui.infopop/plugin.properties b/docs/org.eclipse.wst.dtd.ui.infopop/plugin.properties
index ba0e6f2..76c52ba 100644
--- a/docs/org.eclipse.wst.dtd.ui.infopop/plugin.properties
+++ b/docs/org.eclipse.wst.dtd.ui.infopop/plugin.properties
@@ -1,3 +1,13 @@
-# NLS_MESSAGEFORMAT_VAR
+###############################################################################
+# Copyright (c) 2001, 2004 IBM Corporation and others.
+# 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:
+#     IBM Corporation - initial API and implementation
+###############################################################################
 
-pluginName = DTD Editor infopops
+pluginName     = DTD Editor infopops
+pluginProvider = Eclipse.org
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.xml b/docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.xml
index 6b48249..ad1932c 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.xml
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.xml
@@ -12,7 +12,7 @@
  *******************************************************************************/ -->
  
 <toc label="DTD Editor">
-   <topic label="Working with DTDs" topic="topics/cworkdtds.html">
+   <topic label="Working with DTDs" href="topics/cworkdtds.html">
       <topic label="Creating DTDs" href="topics/tcretdtd.html">
          <topic label="Document type definitions (DTDs) - overview" href="topics/cdtdover.html"/>
            <topic label="Setting source highlighting styles" href="topics/tedtsrcst.html"/>
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.dtdeditor.doc.user/META-INF/MANIFEST.MF
index 9bd2708..d402dcd 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/META-INF/MANIFEST.MF
@@ -1,8 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: DTD Editor documentation
+Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtdeditor.doc.user; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Eclipse.org
+Bundle-Version: 1.0.2.qualifier
+Bundle-Vendor: %pluginProvider
 Bundle-Localization: plugin
-Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/build.properties b/docs/org.eclipse.wst.dtdeditor.doc.user/build.properties
index 169d040..401fe92 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/build.properties
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/build.properties
@@ -1,6 +1,5 @@
 bin.includes = DTDEditormap_toc.xml,\
                about.html,\
-               dtdeditor_reference_toc.xml,\
                images/,\
                plugin.properties,\
                plugin.xml,\
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/plugin.properties b/docs/org.eclipse.wst.dtdeditor.doc.user/plugin.properties
index e9909ab..d10ce86 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/plugin.properties
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/plugin.properties
@@ -1,3 +1,4 @@
 # NLS_MESSAGEFORMAT_VAR
 
-Plugin.name = DTD Editor
+pluginName     = DTD Editor documentation
+pluginProvider = Eclipse.org
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.html b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.html
index 67d7224..65abeee 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.html
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.html
@@ -46,8 +46,5 @@
 <a href="../topics/tvaldtd.html" title="Validating a DTD file lets you verify that it is well formed and does not contain any errors.">Validating DTDs</a><br />
 </p>
 </div>
-		<p>
-		(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
-		</p> 
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.html b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.html
index e5d7d29..2b7bba0 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.html
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.html
@@ -40,9 +40,6 @@
 These DTD editor icons appear in the Outline view.</li>
 </ul>
 </div></body>
-</html>
-		<p>
-		(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
-		</p> 
+</html> 
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.html b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.html
index 098e8f1..9faf52d 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.html
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.html
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
 <!-- /*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
@@ -11,8 +13,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<html>
-<head>
 <link rel="stylesheet" type="text/css" href="../org.eclipse.wst.doc.user/common.css" />
 <title>Icons used in the DTD editor</title>
 </head>
@@ -72,8 +72,5 @@
 </p>
 
 </div>
-		<p>
-		(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
-		</p> 
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html
index 973982a..a64dc83 100644
--- a/docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html
+++ b/docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html
@@ -46,7 +46,12 @@
 <p>
 <b class="parentlink">Parent topic:</b> <a href="../topics/cworkdtds.html" title="Working with DTDs">Working with DTDs</a><br />
 </p>
-
 </div>
+
+<div><div class="relinfo"><strong>Related information</strong><br />
+<div><a href="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" title="General validation information">../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html</a></div>
+</div>
+</div>
+
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.html.ui.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.html.ui.infopop/META-INF/MANIFEST.MF
index 12b00d1..0b50faf 100644
--- a/docs/org.eclipse.wst.html.ui.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.html.ui.infopop/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: HTML editor infopops
 Bundle-SymbolicName: org.eclipse.wst.html.ui.infopop; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.sse.doc.user/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.sse.doc.user/META-INF/MANIFEST.MF
index 2551bf5..4829ed3 100644
--- a/docs/org.eclipse.wst.sse.doc.user/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.sse.doc.user/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Structured text editor and snippets documentation
 Bundle-SymbolicName: org.eclipse.wst.sse.doc.user; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.sse.ui.infopop/EditorCssContexts.xml b/docs/org.eclipse.wst.sse.ui.infopop/EditorCssContexts.xml
deleted file mode 100644
index e69de29..0000000
--- a/docs/org.eclipse.wst.sse.ui.infopop/EditorCssContexts.xml
+++ /dev/null
diff --git a/docs/org.eclipse.wst.sse.ui.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.sse.ui.infopop/META-INF/MANIFEST.MF
index bf16c29..6af73d3 100644
--- a/docs/org.eclipse.wst.sse.ui.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.sse.ui.infopop/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: SSE infopops
 Bundle-SymbolicName: org.eclipse.wst.sse.ui.infopop; singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.sse.ui.infopop/build.properties b/docs/org.eclipse.wst.sse.ui.infopop/build.properties
index 00318b9..6da2446 100644
--- a/docs/org.eclipse.wst.sse.ui.infopop/build.properties
+++ b/docs/org.eclipse.wst.sse.ui.infopop/build.properties
@@ -2,6 +2,5 @@
                about.html,\
                plugin.xml,\
                META-INF/,\
-               EditorCssContexts2.xml,\
-               EditorCssContexts.xml
+               EditorCssContexts2.xml
 src.includes = build.properties
diff --git a/docs/org.eclipse.wst.sse.ui.infopop/plugin.xml b/docs/org.eclipse.wst.sse.ui.infopop/plugin.xml
index 4a55b99..2a3796f 100644
--- a/docs/org.eclipse.wst.sse.ui.infopop/plugin.xml
+++ b/docs/org.eclipse.wst.sse.ui.infopop/plugin.xml
@@ -15,7 +15,6 @@
 
 <extension point="org.eclipse.help.contexts">
        <contexts file="EditorContexts.xml" plugin ="org.eclipse.wst.sse.ui"/>
-       <contexts file="EditorCssContexts.xml" plugin ="org.eclipse.wst.sse.ui"/>
        <contexts file="EditorCssContexts2.xml" plugin ="org.eclipse.wst.sse.ui"/>
 </extension>
 
diff --git a/docs/org.eclipse.wst.web.ui.infopop/.project b/docs/org.eclipse.wst.web.ui.infopop/.project
new file mode 100644
index 0000000..10c4a6e
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.wst.web.ui.infopop</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/docs/org.eclipse.wst.web.ui.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.web.ui.infopop/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ad5f8d2
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Static Web infopop
+Bundle-SymbolicName: org.eclipse.wst.web.ui.infopop; singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Vendor: %pluginProvider
+Bundle-Localization: plugin
+Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.web.ui.infopop/StaticWebWizContexts.xml b/docs/org.eclipse.wst.web.ui.infopop/StaticWebWizContexts.xml
new file mode 100644
index 0000000..f933736
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/StaticWebWizContexts.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS type="org.eclipse.help.contexts"?>
+<!-- /*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/ -->
+<contexts>
+<context id="org.eclipse.wst.web.ui.webw2000">
+<description> Use this page to name your Web project and specify the file system location (the place where the resources you create are stored.) When the Use default check box is selected, the project will be created in the file system location where your workspace resides. To change the default file system location, clear the checkbox and locate the path using the <b>Browse</b> button. To configure additional options, select the <b>Next</b> button.
+In the Target Runtime field, select the server where you want to publish the Web project. if a server is not already defined, click <b>New</b> to select a server runtime environment. </description>
+<topic label="Creating a static Web project" href="../org.eclipse.wst.webtools.doc.user/topics/twcresta.html"/>
+</context>
+
+<context id="org.eclipse.wst.web.ui.webw2100">
+<description>Presets are used to define a default set of facet versions that will configure a project for a particular type of development. The Static Web Module facet enables the project to be deployed as a static
+Web module. Click Show Runtimes to view the available runtimes and runtime compositions.</description>
+<topic label="Creating a static Web project" href="../org.eclipse.wst.webtools.doc.user/topics/twcresta.html"/>
+</context>
+
+<context id="org.eclipse.wst.web.ui.webw2200">
+<description>The Web content folder is where the elements of your Web site such as Web pages, graphics and style sheets are stored. This directory structure is necessary to ensure that the content of your Web site will be included in the WAR file at deployment and that link validation will work correctly.
+</description>
+<topic label="Creating a static Web project" href="../org.eclipse.wst.webtools.doc.user/topics/twcresta.html"/>
+</context>
+
+
+</contexts>
diff --git a/docs/org.eclipse.wst.web.ui.infopop/about.html b/docs/org.eclipse.wst.web.ui.infopop/about.html
new file mode 100644
index 0000000..4c99086
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>February 24, 2005</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.web.ui.infopop/build.properties b/docs/org.eclipse.wst.web.ui.infopop/build.properties
new file mode 100644
index 0000000..d9a93d8
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/build.properties
@@ -0,0 +1,6 @@
+bin.includes = StaticWebWizContexts.xml,\
+               about.html,\
+               plugin.xml,\
+               plugin.properties,\
+               META-INF/
+src.includes = build.properties
diff --git a/development/org.eclipse.wst.sse.unittests/plugin.properties b/docs/org.eclipse.wst.web.ui.infopop/plugin.properties
similarity index 72%
copy from development/org.eclipse.wst.sse.unittests/plugin.properties
copy to docs/org.eclipse.wst.web.ui.infopop/plugin.properties
index 535a870..b61d2de 100644
--- a/development/org.eclipse.wst.sse.unittests/plugin.properties
+++ b/docs/org.eclipse.wst.web.ui.infopop/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2001, 2004 IBM Corporation and others.
+# Copyright (c) 2006 IBM Corporation and others.
 # 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
@@ -7,8 +7,7 @@
 # 
 # Contributors:
 #     IBM Corporation - initial API and implementation
-#     
 ###############################################################################
-XML_Source_Page_Editor.name=XML Source Page Editor
-JavaScript_Source_Page_Editor.name=JavaScript Source Page Editor
 
+pluginName     = Static Web infopop
+pluginProvider = Eclipse.org
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.web.ui.infopop/plugin.xml b/docs/org.eclipse.wst.web.ui.infopop/plugin.xml
new file mode 100644
index 0000000..20ac018
--- /dev/null
+++ b/docs/org.eclipse.wst.web.ui.infopop/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- ================================================= -->
+<!-- This is the plugin for declaring the help         -->
+<!-- contributions for using the tool.                 -->
+<!-- ================================================= -->
+<!-- /*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/ -->
+<plugin>
+
+<extension point="org.eclipse.help.contexts">
+      <contexts file="StaticWebWizContexts.xml" plugin ="org.eclipse.wst.web.ui"/>
+</extension>
+
+
+</plugin>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.webtools.doc.user/META-INF/MANIFEST.MF
index 1b83008..587f6f2 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.webtools.doc.user/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Web tools documentation
+Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.webtools.doc.user; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Eclipse.org
+Bundle-Version: 1.0.2.qualifier
+Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/docs/org.eclipse.wst.webtools.doc.user/build.properties b/docs/org.eclipse.wst.webtools.doc.user/build.properties
index bb5cca9..6609225 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/build.properties
+++ b/docs/org.eclipse.wst.webtools.doc.user/build.properties
@@ -3,5 +3,6 @@
                about.html,\
                images/,\
                topics/,\
-               META-INF/
+               META-INF/,\
+               plugin.properties
 src.includes = build.properties
diff --git a/development/org.eclipse.wst.sse.unittests/plugin.properties b/docs/org.eclipse.wst.webtools.doc.user/plugin.properties
similarity index 80%
rename from development/org.eclipse.wst.sse.unittests/plugin.properties
rename to docs/org.eclipse.wst.webtools.doc.user/plugin.properties
index 535a870..acba026 100644
--- a/development/org.eclipse.wst.sse.unittests/plugin.properties
+++ b/docs/org.eclipse.wst.webtools.doc.user/plugin.properties
@@ -7,8 +7,7 @@
 # 
 # Contributors:
 #     IBM Corporation - initial API and implementation
-#     
 ###############################################################################
-XML_Source_Page_Editor.name=XML Source Page Editor
-JavaScript_Source_Page_Editor.name=JavaScript Source Page Editor
 
+pluginName   = Web tools documentation
+providerName = Eclipse.org
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.html b/docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.html
index dad85c5..59b1d41 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.html
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
  * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
@@ -13,100 +12,67 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Static Web projects</title>
 </head>
-<body id="ccstatic"><a name="ccstatic"><!--test --></a>
-
+<body id="ccstatic"><a name="ccstatic"><!-- --></a>
 <h1 class="topictitle1">Static Web projects</h1>
 <div><p>If you  want to create a content-based Web application that does not contain
-
 any dynamic content  (such as servlets, JSP files, filters, and associated
-
 metadata) you might prefer to create a static Web project, as opposed to a <a href="ccwebprj.html">dynamic Web project</a>.</p>
 <div class="p">Static Web projects have the following characteristics:  <ul><li>a Web content folder (called WebContent) for all publishable resources,
-
 You can change the name of this folder from the project's pop-up menu.</li>
 <li>a Theme folder, the suggested directory for storing cascading style sheets
-
 and other style-related objects.</li>
 <li>the ability to define folders outside of the Web content folder, for storing
-
 intermediate files, such as MIF files</li>
 <li>a conversion path from a static Web project to a dynamic Web project.
-
-If you decide to <a href="../../org.eclipse.wst.webtools.doc.user/topics/twpcnvrt.html">convert</a> the project, it will be a fully-valid dynamic
-
+If you decide to <a href="twpcnvrt.html">convert</a> the project, it will be a fully-valid dynamic
 Web project. </li>
 </ul>
 </div>
 <div class="p">In addition, your project will still have the following features (which
-
 are common to both static and dynamic Web projects ) : <ul><li>HTML syntax validation</li>
 <li>a broken link fix-up wizard</li>
 <li>a Web site navigation tool</li>
 <li>a new server type, the Static Web server, which makes it easy to publish
-
-static Web projects
-</li>
+static Web projects</li>
 </ul>
  </div>
 <p>The folder that a static Web project is published to is modifiable, so
-
-that when you set the publishing "root" value (called a <i>context root</i>),
-
+that when you set the publishing "root" value (called a <em>context root</em>),
 such as <samp class="codeph">/web1</samp>, for a static project, everything in the Web
-
 content folder will be published to the <span class="filepath">web1</span> folder under
-
 the Web server's doc root. This enables you to group Web resources on a Web
-
 server in folders that correspond to Web projects in the workbench. When projects
-
 defined in this way are ready for production, you can publish specific projects
-
 directly to the doc root by changing the value to <samp class="codeph">/</samp> and all
-
 publishing, link fixing, and browsing will update automatically.</p>
 <div class="p">Aliases can also be used to specify a context root value. For example,
-
 suppose that there is an alias that is defined on the target Web server, as
-
 follows: <pre>Alias /scripts/ "/var/www/scripts"</pre>
 In this
-
-example, in which the current static Web project will contain common JavaScript™ files,
-
+example, in which the current static Web project will contain common JavaScript&#8482; files,
 you can set the context root value to be <span>"scripts"</span>.  In order for
-
 the resources in the static Web project to be published to the correct location
-
 on the Web server, you must add this Alias mapping to the server tools instance
-
 of the static Web server, as follows.  <ol><li>From the Server view, double-click on the static Web server configuration
-
-to open the server configuration editor.<div class="note"><span class="notetitle">Note: </span>This assumes that you've already
-
+to open the server configuration editor.<div class="note"><span class="notetitle">Note:</span> This assumes that you've already
 defined the static Web server.</div>
 </li>
-<li>Click the <span class="uicontrol">Configuration</span> editor tab.</li>
-<li>Scroll down to the <span class="uicontrol">Alias Path Mapping</span> section,
-
+<li>Click the <b>Configuration</b> editor tab.</li>
+<li>Scroll down to the <b>Alias Path Mapping</b> section,
 and add the new Alias mapping.</li>
 </ol>
 Now that <span>"scripts"</span> is defined as an Alias, the Web content in
-
 the static Web project will be published to the mapped path, <span class="filepath">/var/www/scripts</span>.</div>
 </div>
-<div><p><b class="relconceptshd">Related concepts</b><br />
-<a href="ccwtover.html" title="">Web application overview</a><br />
-<a href="cwebdevelopmenttools.html" title="">Web development tools</a><br />
-<a href="ccwebprj.html" title="">Dynamic Web projects and applications</a><br />
-<a href="cwwarovr.html" title="">Web archive (WAR) files</a><br />
-</p>
-<!--<p><b class="reltaskshd">Related tasks</b><br />
-<br />
-</p>-->
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="cwebresources.html">Web resources</a></div>
+<div><a href="cwwarovr.html">Web archive (WAR) files</a></div>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="twcresta.html">Creating a static Web project</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html
index cceca0b..aaa9bbc 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,207 +12,128 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Dynamic Web projects and applications</title>
 </head>
 <body id="ccwebprj"><a name="ccwebprj"><!-- --></a>
-
 <h1 class="topictitle1">Dynamic Web projects and applications</h1>
-<div><p>There are two types of Web projects: dynamic and <a href="ccstatic.html">static</a>. Dynamic web projects can contain
-
-dynamic J2EE resources such as servlets, JSP files, filters, and associated
-
-metadata, in addition to static resources such as images and HTML files. Static
-
-web projects only contains static resources. When you create Web projects,
-
-you can include cascading style sheets and JSP tag libraries (for dynamic
-
-Web projects), so that you can begin development with a richer set of project
-
-resources.</p>
+<div><p>There are two types of Web projects: dynamic and <a href="ccstatic.html">static</a>. Dynamic web projects can contain dynamic J2EE
+resources such as servlets, JSP files, filters, and associated metadata, in
+addition to static resources such as images and HTML files. Static web projects
+only contains static resources. When you create Web projects, you can include
+cascading style sheets and JSP tag libraries (for dynamic Web projects), so
+that you can begin development with a richer set of project resources.</p>
 <p>Dynamic Web projects are always imbedded in Enterprise Application projects.
-
 The wizard that you use to create a dynamic Web project will also create an
-
 Enterprise Application (EAR) project if it does not already exist. The wizard
-
 will also update the <span class="filepath">application.xml</span> deployment descriptor
-
 of the specified Enterprise Application project to define the Web project
-
 as a module element. If you are importing a WAR file rather than creating
-
 a dynamic Web project new, the WAR Import wizard requires that you specify
-
 a Web project, which already requires an EAR project. </p>
 <p>J2EE conventions may represent extra overhead if you only want to create
-
 a static, content-based Web application, which contains no dynamic files,
-
 such as JSP files or servlets. In this case, when you need only the most basic
-
-Web project, you might want to use the <i>static</i> Web project type (see <a href="ccstatic.html">Static Web projects</a>). Note that static Web projects
-
-can  be converted to dynamic Web projects by selecting <b>Convert to a Dynamic
-
-Web Project</b>, from the Project menu.</p>
-<p>The J2EE model, and more specifically, the <cite>Sun Microsystems Java™ Servlet
-
+Web project, you might want to use the <em>static</em> Web project type (see <a href="ccstatic.html">Static Web projects</a>).  Note that
+static Web projects can  be converted to dynamic Web projects by selecting <strong>Convert
+to a Dynamic Web Project</strong>, from the Project menu.</p>
+<p>The J2EE model, and more specifically, the <cite>Sun Microsystems Java&#8482; Servlet
 2.3 Specification</cite>, defines a Web application directory structure that
-
 specifies the location of Web content files, class files, class paths, deployment
-
 descriptors, and supporting metadata. The Web project hierarchy mirrors that
-
 of the Web application created from a project. In the workbench, you can use
-
 the <span>New Web Project</span> wizard to create a new Web project.</p>
 <div class="p">The main project folder contains all development objects related to a Web
-
 application. The Web content folder contains the elements of the project necessary
-
 to create a Web application. This folder structure maps to the Web application
-
 archive (WAR) structure defined by Sun Microsystems.. The following default
-
-elements are located in the Web project folder hierarchy: <div class="note"><span class="notetitle">Note: </span>In the Project
-
+elements are located in the Web project folder hierarchy: <div class="note"><span class="notetitle">Note:</span> In the Project
 Explorer view, Web projects are filtered into folder nodes to customize the
-
 display of Web resources for easy management during development. For information
-
-on the filtered structure, see <a href="../../org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html">Project Explorer view</a>.</div>
-<dl><dt class="bold">Web Deployment Descriptor</dt>
+on the filtered structure, see <a href="ccwebvw.html">Project
+Explorer view</a>.</div>
+<dl><dt class="dlterm">Web Deployment Descriptor</dt>
 <dd>The standard Web application deployment descriptor (the <span class="filepath">web.xml</span> file).</dd>
-<dt class="bold">JavaSource</dt>
+<dt class="dlterm">JavaSource</dt>
 <dd>Contains the project's Java source code for classes, beans, and
-
 servlets. When these resources are added to a Web project, they are automatically
-
 compiled and the generated files are added to the WEB-INF/classes directory.
-
 The contents of the source directory are not packaged in WAR files unless
-
-an option is specified when a WAR file is created. <div class="note"><span class="notetitle">Note: </span>Though the default
-
+an option is specified when a WAR file is created. <div class="note"><span class="notetitle">Note:</span> Though the default
 name given to the folder is JavaSources, you can change the name through the
-
-Project Explorer view or through the Preferences page available by selecting <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Web
-
-Tools</span> &gt; <span class="uicontrol">New J2EE Project</span></span>.</div>
+Project Explorer view or through the Preferences page available by selecting <span class="menucascade"><b>Window</b> &gt; <b>Preferences</b> &gt; <b>Web
+Tools</b> &gt; <b>New J2EE Project</b></span>.</div>
 </dd>
-<dt class="bold">imported_classes folder</dt>
+<dt class="dlterm">imported_classes folder</dt>
 <dd>This folder may be created during a WAR import, and contains class files
-
-that do not have accompanying source.  The <span class="uicontrol">imported_classes</span> folder
-
+that do not have accompanying source.  The <b>imported_classes</b> folder
 is a Java classes
-
-folder; Java classes folders can also be created using the
-
-Web project <span class="uicontrol">Java Build Path</span> properties page.</dd>
-<dt class="bold">WebContent folder</dt>
+folder; Java classes folders can also be created using the Web
+project <b>Java Build Path</b> properties page.</dd>
+<dt class="dlterm">WebContent folder</dt>
 <dd>The mandatory location of all Web resources, including HTML, JSP, graphic
-
 files, and so on. If the files are not placed in this directory (or in a subdirectory
-
 structure under this directory), the files will not be available when the
-
 application is executed on a server. The Web content folder represents the
-
 contents of the WAR file that will be deployed to the server. Any files not
-
 under the Web content folder are considered development-time resources (for
-
 example, .java files, .sql files, and .mif files), and are not deployed when
-
-the project is unit tested or published. <div class="note"><span class="notetitle">Note: </span>Though the default name given
-
+the project is unit tested or published. <div class="note"><span class="notetitle">Note:</span> Though the default name given
 to the folder is <span class="filepath">WebContent</span>, you can change the name
-
- in the Project Explorer by right-clicking the folder and selecting <span class="uicontrol">Rename</span> or
-
+ in the Project Explorer by right-clicking the folder and selecting <b>Rename</b> or
 from the Web page of the project's Properties dialog. In a dynamic Web project,
-
 changing the folder name will update the Java build output directory. You can change
-
 the preference for the default folder name to be applied when creating new
-
-Web projects by selecting <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Web Tools</span> &gt; <span class="uicontrol">New J2EE Project</span></span>.</div>
+Web projects by selecting <span class="menucascade"><b>Window</b> &gt; <b>Preferences</b> &gt; <b>Web Tools</b> &gt; <b>New J2EE Project</b></span>.</div>
 </dd>
-<dt class="bold">META-INF</dt>
+<dt class="dlterm">META-INF</dt>
 <dd>This directory contains the <span class="filepath">MANIFEST.MF</span> file, which
-
 is used to map class paths for dependent JAR files that exist in other projects
-
 in the same Enterprise Application project. An entry in this file will update
-
 the run-time project class path and Java build settings to include the referenced
-
 JAR files.</dd>
-<dt class="bold">theme</dt>
+<dt class="dlterm">theme</dt>
 <dd>The suggested directory for cascading style sheets and other style-related
-
 objects.</dd>
-<dt class="bold">WEB-INF</dt>
-<dd>Based on the <cite>Sun Microsystems Java Servlet 2.3 Specification</cite>,
-
-this directory contains the supporting Web resources for a Web application,
-
-including the <span class="filepath">web.xml</span> file and the classes and lib directories.</dd>
-<dt class="bold">/classes</dt>
+<dt class="dlterm">WEB-INF</dt>
+<dd>Based on the <cite>Sun Microsystems Java Servlet 2.3 Specification</cite>, this
+directory contains the supporting Web resources for a Web application, including
+the <span class="filepath">web.xml</span> file and the classes and lib directories.</dd>
+<dt class="dlterm">/classes</dt>
 <dd>This directory is for servlets, utility classes, and the Java compiler
-
 output directory. The classes in this directory are used by the application
-
 class loader to load the classes. Folders in this directory will map package
-
 and class names, as in: <samp class="codeph">/WEB-INF/classes/com/mycorp/servlets/MyServlet.class</samp>.<p>Do
-
 not place any .class files directly into this directory. The .class files
-
-are placed in this directory automatically when the Java compiler compiles
-
-Java source files that are in the <span class="filepath">Java Resources</span> directory.
-
+are placed in this directory automatically when the Java compiler
+compiles Java source files that are in the <span class="filepath">Java Resources</span> directory.
 Any files placed directly in this directory will be deleted by the Java compiler
-
 when it runs.</p>
 </dd>
-<dt class="bold">/lib</dt>
+<dt class="dlterm">/lib</dt>
 <dd>The supporting JAR files that your Web application references. Any classes
-
 in .jar files placed in this directory will be available for your Web application</dd>
-<dt class="bold">Libraries</dt>
+<dt class="dlterm">Libraries</dt>
 <dd>The supporting JAR files that your Web application references. This folder
-
 mirrors the content of the lib folder. In addition, Web Library Projects,
-
 which are "virtual" JAR files that do not physically reside in the Web project,
-
 but are associated with Java projects elsewhere in your workspace,
-
 are included in this folder. They are packaged with your project when you
-
 export the application's WAR file.</dd>
 </dl>
- <div class="note"><span class="notetitle">Note: </span>A library entry on the Java build path will remain there unless
-
+ <div class="note"><span class="notetitle">Note:</span> A library entry on the Java build path will remain there unless
 the actual JAR file is deleted from the WEB-INF/lib folder. If you remove
-
 a library path entry but not the JAR file, the library entry will be re-added
-
 to the path automatically.</div>
 </div>
-<div class="p"><b>Related concepts</b>  <p><a href="ccwtover.html">Web application overview</a><br />
-<br />
-<a href="cwebdevelopmenttools.html">Web development tools</a><br />
-<br />
-<a href="ccstatic.html">Static Web projects</a><br />
-<br />
-<a href="cwwarovr.html">Web archive (WAR) files</a></p>
+</div>
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="cwebresources.html">Web resources</a></div>
+<div><a href="cwwarovr.html">Web archive (WAR) files</a></div>
+</div>
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="twcreprj.html">Creating a dynamic Web project</a></div>
+<div><a href="tjcrejsp.html">Creating JavaServer Pages (JSP) files</a></div>
 </div>
 </div>
-</body>
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html
index be1c8fa..0810e9f 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,96 +12,57 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Project Explorer view and Web development</title>
 </head>
 <body id="ccwebvw"><a name="ccwebvw"><!-- --></a>
-
 <h1 class="topictitle1">Project Explorer view and Web development</h1>
-<div><div class="skipspace"><div class="p">Depending on the product that you have installed, the Project Explorer view may contain the following features: <ul>
-
-
-<li><img src="../images/nwin.gif" alt="For Windows" /> You
-
-can drag and drop files from Windows<sup>®</sup> Explorer or the desktop into the
-
-Navigator view.</li>
-<li>View filtering is supported by selecting <span><span class="uicontrol">Filters</span></span> from
-
-the Navigator view <span><span class="uicontrol">Menu</span></span> button. Resources
-
+<div><div class="section"><div class="p">The Project Explorer view provides the following notable features: <ul><li><img src="../images/nwin.gif" alt="For Windows"> You can drag and drop files from Windows<sup>&reg;</sup> Explorer or the desktop into
+the Navigator view.</li>
+<li>View filtering is supported by selecting <span><b>Filters</b></span> from
+the Navigator view <span><b>Menu</b></span> button. Resources
 can be filtered by name, project type or working set. Files beginning with
-
 a period are filtered out by default.</li>
 <li>The status line shows the full path of the selected resource.</li>
 <li>Dragging a .java file from the Navigator view into a JSP file will insert
-
 a usebean tag, the same behavior that is exhibited when a .class file is dragged
-
 into a JSP file.</li>
-<li>Errors and warnings on resources (including Java™, HTML/JSP, and Links Builder errors
-
-and warnings) are indicated with a red error <img src="../images/nshowerr.gif" alt="Error icon" /> or yellow warning <img src="../images/nwarning.gif" alt="Warning icon" /> next to the resource with the error,
-
-as well as the parent containers up to the project. This applies for all project
-
-types, not only Web projects.</li>
-<li>Items available from the <span><span class="uicontrol">New</span></span> cascading
-
-menu in the project pop-up menu are context sensitive.  All menus will have <span><span class="uicontrol">Project</span></span> and <span><span class="uicontrol">Other</span></span> options.</li>
-
-<li>All projects are automatically grouped by type. </li>
-
+<li>Errors and warnings on resources (including Java&#8482;, HTML/JSP, and Links Builder errors
+and warnings) are indicated with a red error <img src="../images/nshowerr.gif" alt="Error icon"> or yellow warning <img src="../images/nwarning.gif" alt="Warning icon"> next to the resource with the error, as well as
+the parent containers up to the project. This applies for all project types,
+not only Web projects.</li>
+<li>Items available from the <span><b>New</b></span> cascading
+menu in the project pop-up menu are context sensitive.  All menus will have <span><b>Project</b></span> and <span><b>Other</b></span> options.</li>
+<li>All projects are automatically grouped by type. <img src="../images/grptype.gif" alt="Group Project by Type Icon">. </li>
 </ul>
 </div>
 </div>
-<div class="skipspace"><h4 class="sectiontitle">Organization of the Project Explorer view</h4><p>The Project
-
+<div class="section"><h4 class="sectiontitle">Organization of the Project Explorer view</h4><p>The Project
 Explorer view shows a custom view of a dynamic Web project. By default, dynamic
-
 web projects appear under a top-level category called Dynamic Web Projects.
-
 The following are some of the notable top-level objects that appear beneath
-
 the project node (based on default folder names).</p>
-
-
-</li>
-</ul>
-</div>
-<div class="p"><b>Web content folder</b> - This folder contains items to be published
-
-to the server. By default, this folder will be named <b>WebContent</b> for
-
-newly created static and dynamic Web projects. <div class="note"><span class="notetitle">Note: </span>You can change the name
-
-in the Web page of the project's Properties dialog. In a dynamic Web project,
-
-changing the folder name will update the Java build output directory. You can change
-
-the preference for the default folder name to be applied when creating new
-
-Web projects by selecting <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Web Tools</span> &gt; <span class="uicontrol">New J2EE Project</span></span>. </div>
-<ul><li><b>META-INF</b> - This directory contains the <span class="filepath">MANIFEST.MF</span> file,
-
+<div class="p"><strong>Web content folder</strong> -
+This folder contains items to be published to the server. By default, this
+folder will be named <strong>WebContent</strong> for newly created static and dynamic
+Web projects. <div class="note"><span class="notetitle">Note:</span> You can change the name in the Web page of the project's
+Properties dialog. In a dynamic Web project, changing the folder name will
+update the Java build output directory. You can change the preference
+for the default folder name to be applied when creating new Web projects by
+selecting <span class="menucascade"><b>Window</b> &gt; <b>Preferences</b> &gt; <b>Web Tools</b> &gt; <b>New J2EE Project</b></span>. </div>
+<ul><li><strong>META-INF</strong> - This directory contains the <span class="filepath">MANIFEST.MF</span> file,
 which is used to map class paths for dependent JAR files that exist in other
-
 projects in the same Enterprise Application project. An entry in this file
-
 will update the run-time project class path and Java build settings to include the referenced
-
 JAR files.</li>
 </ul>
-<ul><li><b>WEB-INF</b> - The directory where supporting Web resources for a Web
-
+<ul><li><strong>WEB-INF</strong> - The directory where supporting Web resources for a Web
 application are kept (for example: .xmi files, .xml files, and web.xml.) Note
-
 that double-clicking on the web.xml file has the same effect as double-clicking
-
 on the Deployment Descriptor: it opens the Web Deployment Descriptor editor.</li>
 </ul>
  </div>
  </div>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div></div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.html b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.html
index fa4c32b..f9a9711 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,29 +12,28 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Web application overview</title>
 </head>
 <body id="ccwtover"><a name="ccwtover"><!-- --></a>
-
 <h1 class="topictitle1">Web application overview</h1>
-<p>The Web development environment provides the tools
-
-you need to develop Web applications as defined in the <cite>Sun Microsystems Java™ Servlet
-
+<div><p>The Web development environment provides the tools you need to develop
+Web applications as defined in the <cite>Sun Microsystems Java&#8482; Servlet
 2.3 Specification</cite> and the <cite>Sun Microsystems JSP 1.2 Specification</cite>.
-
 Web applications can be simple (consisting of only static Web pages) or they
-
 can be more advanced and include JavaServer Pages (JSP) files and Java servlets.
-
-These resources, along with an XML <a href="../org.eclipse.wst.webtools.doc.user/topics/twedtwbx.html">deployment descriptor</a> (<span class="filepath">web.xml</span>) and other <a href="cwebresources.html"> Web resources</a>, are contained within a Web project during development.
-
-When you are ready to publish the Web application to the Web, you deploy the
-
-Web project to the server in the form of a Web archive (WAR) file . The end
-
-user can then view the Web application as a Web site from a URL.</p>
+These resources, along with an XML deployment descriptor (and other <a href="cwebresources.html"> Web resources</a>, are contained
+within a Web project during development. When you are ready to publish the
+Web application to the Web, you deploy the Web project to the server in the
+form of a Web archive (WAR) file . The end user can then view the Web application
+as a Web site from a URL.</p>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="cwtfeatures.html" title="The integrated Web development environment makes it easy to cooperatively create, assemble, publish, deploy and maintain dynamic, interactive Web applications.">Web tools features</a></div>
+</div>
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="twcreprj.html">Creating a dynamic Web project</a></div>
+<div><a href="tjdetags.html">Creating and editing Web pages - overview</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html
index 2b43af2..86c3c74 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,68 +12,45 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>JavaServer Pages (JSP) technology</title>
 </head>
 <body id="cpdjsps"><a name="cpdjsps"><!-- --></a>
-
 <h1 class="topictitle1">JavaServer Pages (JSP) technology</h1>
 <div><p>The JavaServer Pages technology enables you to generate dynamic web content,
-
 such as HTML, DHTML, XHTML, and XML files, to include in a Web application.
-
-JSP files are one way to implement server-side dynamic
-
-page content. JSP files allow a Web server, such as WebSphere<sup>®</sup> Application
-
-Server or Apache Tomcat, to add content dynamically to your HTML pages before
-
-they are sent to a requesting browser.</p>
+JSP files are one way to implement server-side dynamic page content. JSP files
+allow a Web server, such as Apache Tomcat,
+to add content dynamically to your HTML pages before they are sent to a requesting
+browser.</p>
 <p>When you deploy a JSP file to a Web server that provides a servlet engine,
-
 it is preprocessed into a servlet that runs on the Web server. This is in
-
-contrast with client-side JavaScript™ (within <samp class="codeph">&lt;SCRIPT&gt;</samp> tags),
-
+contrast with client-side JavaScript&#8482; (within <samp class="codeph">&lt;SCRIPT&gt;</samp> tags),
 which is run in a browser. A JSP page is ideal for tasks that are better suited
-
-to execution on the server, such as accessing databases or calling Enterprise Java™ beans.</p>
-<p>You can create and edit a JSP file in the HTML editor
-
-by adding your own text and images using HTML, JSP tagging, or JavaScript,
-
-including Java source code inside of scriptlet tags. Typically,
-
-JSP files have the file extension .jsp. Additionally, the JSP specification
-
-suggests that JSP fragment files should have file extension .jspf. If this
-
-convention is not followed, the JSP validator will treat JSP fragments as
-
-regular standalone JSP files, and compilation errors might be reported.</p>
+to execution on the server, such as accessing databases or calling Enterprise Java&#8482; beans.</p>
+<p>You can create and edit a JSP file in the HTML editor by adding your own
+text and images using HTML, JSP tagging, or JavaScript, including Java source
+code inside of scriptlet tags. Typically, JSP files have the file extension
+.jsp. Additionally, the JSP specification suggests that JSP fragment files
+should have file extension .jspf. If this convention is not followed, the
+JSP validator will treat JSP fragments as regular standalone JSP files, and
+compilation errors might be reported.</p>
 <p>The <cite>Sun Microsystems JSP 1.2 Specification</cite> provides the ability
-
-to create custom JSP tags. Custom tags simplify complex actions and 
-
-provide developers with greater control over page content. Custom tags are
-
-collected into a library (taglib). A tag library descriptor file (taglib.tld)
-
-is an XML document that provides information about the tag library, including
-
-the taglib short name, library description, and tag descriptions. Refer to
-
-the <cite>Sun Microsystems JSP 1.2 Specification</cite> for more details.</p>
+to create custom JSP tags. Custom tags simplify complex actions and  provide
+developers with greater control over page content. Custom tags are collected
+into a library (taglib). A tag library descriptor file (taglib.tld) is an
+XML document that provides information about the tag library, including the
+taglib short name, library description, and tag descriptions. Refer to the <cite>Sun
+Microsystems JSP 1.2 Specification</cite> for more details.</p>
 <p>To use JSP 1.2 custom taglibs, you can import the tag library .tld and
-
 .jar files into your project to use them, or associate them as Web Library
-
 projects. You can also reference a TLD file by using a URI.</p>
 </div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="tjcrejsp.html">Creating JSP files</a><br />
-</p>
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="cwservbn.html">Servlets</a></div>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="tjcrejsp.html">Creating JavaServer Pages (JSP) files</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebdevelopmenttools.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebdevelopmenttools.html
deleted file mode 100644
index dc99b3f..0000000
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebdevelopmenttools.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
-<title>Web development tools</title>
-</head>
-<body id="cwebdevelopmenttools"><a name="cwebdevelopmenttools"><!-- --></a>
-
-<h1 class="topictitle1">Web development tools</h1>
-<div><p>The Web development tools enable you to create Web applications
-
-that range from simple static sites to dynamic Web applications that use the latest Web technologies.</p>
-The editors include standard source editors with <a href="../../org.eclipe.wst.sse.doc.user/topics/tsrcedt005.html">content assist</a> features.
-
- To extend
-
-these pages, you can include form elements, Java™ applets, embedded scripts, dynamic
-
-controls, and <a href="cpdjsps.html"> JavaServer Pages</a> (JSP)
-
-tags.<p></p>
-
-
- </div>
-<p><b class="relconceptshd">Related concepts</b><br />
-<a href="cwwarovr.html" title="">Web archive (WAR) files</a><br />
-<a href="ccwebprj.html" title="">Dynamic Web projects and applications</a><br />
-<a href="ccstatic.html" title="">Static Web projects</a><br />
-<a href="cwebprojects.html" title="">Web projects</a><br />
-<a href="cwebpagedesign.html" title="">Web page design</a><br />
-<a href="cwebtechnologies.html" title="">Web technologies</a><br />
-</p>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="twcreprj.html">Creating a dynamic Web project</a><br />
-<a href="twcresta.html">Creating a static Web project</a><br />
-<a href="tjcrejsp.html">Creating JavaServer Pages (JSP) files</a><br />
-</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.html
index 3dbd84d..8ef59db 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,17 +12,22 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Web page design</title>
 </head>
 <body id="cwebpagedesign"><a name="cwebpagedesign"><!-- --></a>
-
 <h1 class="topictitle1">Web page design</h1>
 <div><p>Web pages are an integral part of every Web application. Each Web page
 should serve to help achieve the overall goal of the entire Web site.</p>
 <p> There are many types of Web pages, ranging from simple HTML pages that
 contain no dynamic elements, to advanced Java-based pages that make use of
 servlets, scripts, forms, or data access components.</p>
+<p>A few of the many items you should consider when designing your pages are
+markup language, links, images, and style sheets.</p>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div>
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="tjdetags.html">Creating and editing Web pages - overview</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.html
index cea9aba..56cf180 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,38 +12,34 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Web projects</title>
 </head>
 <body id="cwebprojects"><a name="cwebprojects"><!-- --></a>
-
 <h1 class="topictitle1">Web projects</h1>
-<div><p>Web projects hold all of the Web resources that
-
-are created and used when developing your Web application. The first step
-
-to creating or importing a Web application is to create either a static or
-
-a dynamic Web project. Static Web projects are meant to contain only simple
-
-Web site resources, such as HTML files. Dynamic Web projects are used to structure
-
-Web applications that will use more complicated, dynamic Web technologies,
-
-such as JavaServer Pages files, and possibly data access resources.</p>
+<div><p>Web projects hold all of the Web resources that are created and used when
+developing your Web application. The first step to creating or importing a
+Web application is to create either a static or a dynamic Web project. Static
+Web projects are meant to contain only simple Web site resources, such as
+HTML files. Dynamic Web projects are used to structure Web applications that
+will use more complicated, dynamic Web technologies, such as JavaServer Pages
+files, and possibly data access resources.</p>
 <p>Though the Web project is structured on your file system in compliance
-
 with the J2EE Web application standard for deployment purposes, the Project
-
 Explorer view is designed to show the most convenient display of project resources
-
 for use while you are actually developing the Web application. When you are
-
 finished developing your Web application, you use the Web project to deploy
-
 the correct resources to the server. These resources will be packaged in a
-
 file called a Web archive, or WAR file.</p>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="ccstatic.html">Static Web projects</a></div>
+<div><a href="ccwebprj.html">Dynamic Web projects and applications</a></div>
+<div><a href="cwwarovr.html">Web archive (WAR) files</a></div>
+</div>
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="twcresta.html">Creating a static Web project</a></div>
+<div><a href="twcreprj.html">Creating a dynamic Web project</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.html
index 48ef8ab..f7ed6b8 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,36 +12,24 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Web resources</title>
 </head>
 <body id="cwebresources"><a name="cwebresources"><!-- --></a>
-
 <h1 class="topictitle1">Web resources</h1>
 <div><p>In most cases, all of the resources that you need to create for your Web
-
 application are developed during Web site or Web page design; however, there
-
 are additional resources that you may need to include in your Web project
-
 if you are using more advanced Web technologies in your application.</p>
 <p>These Web resources are not typical Web page files, and are often not the
-
 resources that you consider part of the final Web site. For example, tag libraries
-
-and Java™ resources,
-
-such as JAR files, are resources you might need to include in your Web project.
-</p>
+and Java&#8482; resources,
+such as JAR files, are resources you might need to include in your Web project. </p>
 <p>In fact, even the WAR file itself could be considered a Web resource, if
-
 you consider importing or exporting the resource.</p>
 </div>
-<div><p><b class="relconceptshd">Related concepts</b><br />
-<a href="cwebpagedesign.html" title="">Web page design</a><br />
-<a href="cwwarovr.html" title="">Web archive (WAR) files</a><br />
-<a href="cpdjsps.html" title="">JavaServer Pages (JSP) technology</a><br />
-</p>
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="cwwarovr.html">Web archive (WAR) files</a></div>
 </div>
-</body>
-</html>
\ No newline at end of file
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebtechnologies.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwebtechnologies.html
deleted file mode 100644
index c6f59de..0000000
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwebtechnologies.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * 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:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
-<title>Web technologies</title>
-</head>
-<body id="cwebtechnologies"><a name="cwebtechnologies"><!-- --></a>
-
-<h1 class="topictitle1">Web technologies</h1>
-<div><p>Many simple technologies, such as text-based markup languages, enable you
-
-to easily create simple Web pages.</p>
-</div>
-<div><p><b class="relconceptshd">Related concepts</b><br />
-<a href="ccwebprj.html" title="">Dynamic Web projects and applications</a><br />
-<a href="ccstatic.html" title="">Static Web projects</a><br />
-<a href="cpdjsps.html" title="">JavaServer Pages (JSP) technology</a><br />
-<a href="cwebprojects.html" title="">Web projects</a><br />
-<a href="cwebdevelopmenttools.html" title="">Web development tools</a><br />
-<a href="cwebpagedesign.html" title="">Web page design</a><br />
-<a href="cwwedtvw.html" title="">Workbench integration with Web editors</a><br />
-</p>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="twcreprj.html">Creating a dynamic Web project</a><br />
-<a href="twcresta.html">Creating a static Web project</a><br />
-<a href="tjcrejsp.html">Creating JavaServer Pages (JSP) files</a><br />
-<a href="twsrvwiz.html">Creating Servlets</a><br />
-<a href="twedtwbx.html">Configuring Web applications using the Web deployment descriptor
-editor</a><br />
-<a href="tjcrehtm.html">Creating HTML or XHTML files</a><br />
-</p>
-</div>	
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.html
index 306dacd..b398768 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,71 +12,47 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Servlets</title>
 </head>
 <body id="cwservbn"><a name="cwservbn"><!-- --></a>
-
 <h1 class="topictitle1">Servlets</h1>
-<div><p>Servlets are server-side Java™ programs that use the <cite>Sun Microsystems Java Servlet
-
+<div><p>Servlets are server-side Java&#8482; programs that use the <cite>Sun Microsystems Java Servlet
 API</cite> and its associated classes and methods, as defined in the <cite>Sun
-
 Microsystems Java Servlet 2.3 Specification</cite>. These Java programs
-
 extend the functionality of a Web server by generating dynamic content and
-
 responding to Web client requests. When a browser sends a request to the server,
-
 the server can send the request information to a servlet, so that the servlet
-
 can construct the response that is sent back to the browser.</p>
 <p>Just as applets run on a Web browser and extend the browser's capabilities,
-
-servlets run on a Java-enabled Web server, such as the WebSphere<sup>®</sup> Application
-
-Server and extend the server's capabilities. Because of their flexibility
-
-and scalability, servlets are commonly used to enable businesses to connect
-
-databases to the Web.</p>
+servlets run on a Java-enabled Web server and extend
+the server's capabilities. Because of their flexibility and scalability, servlets
+are commonly used to enable businesses to connect databases to the Web.</p>
 <div class="p">Although a servlet can be a completely self-contained program, you can
-
 split application development into two portions:  <ul><li>The business logic (content generation), which governs the relationship
-
 between input, processing, and output</li>
 <li>The presentation logic (content presentation, or graphic design rules),
-
 which determines how information is presented to the user</li>
 </ul>
 Using this paradigm, you may choose to have business logic handled by Java beans,
-
 the presentation logic handled by JavaServer Pages (JSP) or HTML files, and
-
-the HTTP protocol handled by a servlet. <div class="note"><span class="notetitle">Note: </span>JSP files can be used to manage
-
+the HTTP protocol handled by a servlet. <div class="note"><span class="notetitle">Note:</span> JSP files can be used to manage
 both the presentation and business logic for a Web application. JSP files
-
 use structured markup for presentation, and supply servlet model behavior
-
 at run time.</div>
 </div>
-<p>You can develop, debug, and deploy servlets, set breakpoints within servlet objects, and step through
-
-code to make changes that are dynamically folded into the running servlet
-
-on a running server, without having to restart each time.</p>
+<p>You can develop, debug, and deploy servlets, set breakpoints within servlet
+objects, and step through code to make changes that are dynamically folded
+into the running servlet on a running server, without having to restart each
+time.</p>
 <p>For more information about servlets, refer to the <cite>Sun Microsystems Java Servlet
-
 2.3 Specification</cite> at <samp class="codeph">java.sun.com/products/servlet/download.html</samp>.</p>
 </div>
-<div><p><b class="relconceptshd">Related concepts</b><br />
-<a href="ccwtover.html" title="">Web application overview</a><br />
-<a href="cwebdevelopmenttools.html" title="">Web development tools</a><br />
-</p>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="twsrvwiz.html">Creating Servlets</a><br />
-</p>
+<div><div class="relconcepts"><strong>Related concepts</strong><br>
+<div><a href="ccwtover.html">Web application overview</a></div>
 </div>
-</body>
-</html>
\ No newline at end of file
+<div class="reltasks"><strong>Related tasks</strong><br>
+<div><a href="twsrvwiz.html">Creating servlets</a></div>
+</div>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.html b/docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.html
index 9e345d3..4aa0ae1 100644
--- a/docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.html
+++ b/docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.html
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html
-  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
+  PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
 <!-- /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * 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
@@ -13,89 +12,54 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/ -->
-<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
+<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/>
 <title>Web tools features</title>
 </head>
 <body id="cwtfeatures"><a name="cwtfeatures"><!-- --></a>
-
 <h1 class="topictitle1">Web tools features</h1>
-<div><p>The integrated Web development
-
-environment makes it easy to cooperatively create, assemble, publish, deploy
-
-and maintain dynamic, interactive Web applications.</p><d