diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml
new file mode 100644
index 0000000..606f424
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 
+    xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+    xmlns:dti="http://org.eclipse.jsf.pagedesigner/dtinfo.ecore"
+    id="org.eclipse.jst.pagedesigner.tests.testCheckModeOperation"
+    type="tagFile">
+
+    <entity id="testTagOne" type="tag">
+        <trait id="dt-info">
+            <value xsi:type="dti:DTInfo">
+                <tag-convert-info>
+                    <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+                        <parameter value="design"/>
+                        <operation id="org.eclipse.jst.pagedesigner.CreateElementOperation">
+                            <parameter value="div"/>
+                        </operation>
+                        <operation id="org.eclipse.jst.pagedesigner.CopyChildrenOperation"/>
+                    </operation>
+                </tag-convert-info>
+                <tag-decorate-info id="vpd-decorate-preview"
+                        nonVisual="true"
+                />
+            </value>
+        </trait>
+    </entity>
+    
+    <entity id="testTagTwo" type="tag">
+        <trait id="dt-info">
+            <value xsi:type="dti:DTInfo">
+                <tag-convert-info>
+                    <operation id="org.eclipse.jst.pagedesigner.CreateElementOperation">
+                        <parameter value="div"/>
+                    </operation>
+                    <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+                        <parameter value="design"/>
+                        <operation id="org.eclipse.jst.pagedesigner.CopyAttributeOperation">
+                            <parameter value="requiredAttr1"/>
+                        </operation>
+                        <operation id="org.eclipse.jst.pagedesigner.RenameAttributeOperation">
+                            <parameter value="requiredAttr1"/>
+                            <parameter value="id"/>
+                        </operation>
+                    </operation>
+                    <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+                        <parameter value="preview"/>
+                        <operation id="org.eclipse.jst.pagedesigner.CopyAttributeOperation">
+                            <parameter value="requiredAttr2"/>
+                        </operation>
+                        <operation id="org.eclipse.jst.pagedesigner.RenameAttributeOperation">
+                            <parameter value="requiredAttr2"/>
+                            <parameter value="id"/>
+                        </operation>
+                    </operation>
+                </tag-convert-info>
+            </value>
+        </trait>
+    </entity>
+
+</md:metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml
index 7976318..adcc045 100644
--- a/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml
@@ -4,6 +4,10 @@
    <extension
          point="org.eclipse.jst.jsf.common.standardMetaDataFiles">
       <standardMetaDataFile
+            location="/metadata/checkmodeop_dti.xml"
+            uri="org.eclipse.jst.pagedesigner.tests.testCheckModeOperation">
+      </standardMetaDataFile>
+      <standardMetaDataFile
             location="/metadata/test-metadata.xml"
             uri="org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1">
       </standardMetaDataFile>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java
index 4eaa113..76850be 100644
--- a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java
@@ -180,6 +180,122 @@
 	}
 
 	/**
+	 * Test "CheckModeOperation".
+	 */
+	public void testCheckModeOperation() {
+		try {
+			webProjectTestEnv.loadResourceInWebRoot(
+				PageDesignerTestsPlugin.getDefault().getBundle()
+				, "/testdata/checkmodeop/checkModeOp.tld.data"
+				, "/META-INF/checkModeOp.tld");
+
+			webProjectTestEnv.loadResourceInWebRoot(
+				PageDesignerTestsPlugin.getDefault().getBundle()
+				,"/testdata/checkmodeop/testCheckModeOperation.jsp.data"
+				,"/testCheckModeOperation.jsp");
+
+			ContextWrapper wrapper = null;
+
+			// First converter is simple use of CheckModeOperation
+			// containing child operations.
+			// Exercises both design and preview mode, but there should
+			// only be conversion for design view, based on the design
+			// time info trait in the meta-data for the tag in this test.
+			try {
+				wrapper = 
+					getDocumentContext("/WebContent/testCheckModeOperation.jsp", 365);
+
+				String prefix = "cmo";
+				String localName = "testTagOne";
+				ITagConverter tagConverter = 
+					getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
+				assertNotNull(tagConverter);
+
+				// invoke ITagConverter instance
+				tagConverter.convertRefresh(null);
+
+				// get and test result element
+				Element resultElement = tagConverter.getResultElement();
+				assertNotNull(resultElement);
+				assertEquals("div", resultElement.getLocalName());
+
+				// Ensure correct child element was copied to child node list.
+				// First child is text node, look at second child.
+				List<?> childNodes = tagConverter.getChildModeList();
+				assertTrue(childNodes.size() > 1);
+				Node secondChildNode = (Node)childNodes.get(1);
+				assertTrue(secondChildNode instanceof Element);
+				Element secondChildElement = (Element)secondChildNode;
+				assertEquals("span", secondChildElement.getLocalName());
+				assertEquals("t1ChildSpan", secondChildElement.getAttribute("id"));
+
+				// now try in preview mode
+				tagConverter = 
+					getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_PREVIEW);
+				assertNotNull(tagConverter);
+
+				// invoke ITagConverter instance
+				tagConverter.convertRefresh(null);
+
+				// get and test result element
+				resultElement = tagConverter.getResultElement();
+				assertNull(resultElement);
+			} finally {
+				if (wrapper != null) {
+					wrapper.dispose();
+				}
+			}
+
+			// Second tag converter has the CheckModeOperation
+			// as a sibling operation for additional transforms.
+			// Exercises both design and preview mode.
+			try {
+				wrapper = 
+					getDocumentContext("/WebContent/testCheckModeOperation.jsp", 531);
+
+				String prefix = "cmo";
+				String localName = "testTagTwo";
+
+				// test conversion for design mode
+				ITagConverter tagConverter = 
+					getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
+				assertNotNull(tagConverter);
+
+				// invoke ITagConverter instance
+				tagConverter.convertRefresh(null);
+
+				// get and test result element
+				Element resultElement = tagConverter.getResultElement();
+				assertNotNull(resultElement);
+				assertEquals("div", resultElement.getLocalName());
+				assertEquals("designId", resultElement.getAttribute("id"));
+
+				// now try in preview mode
+				tagConverter = 
+					getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_PREVIEW);
+				assertNotNull(tagConverter);
+
+				// invoke ITagConverter instance
+				tagConverter.convertRefresh(null);
+
+				// get and test result element
+				resultElement = tagConverter.getResultElement();
+				assertNotNull(resultElement);
+				assertEquals("div", resultElement.getLocalName());
+				assertEquals("previewId", resultElement.getAttribute("id"));
+			} finally {
+				if (wrapper != null) {
+					wrapper.dispose();
+				}
+			}
+		} catch(Exception ex) {
+			ex.printStackTrace();
+			fail(ex.getLocalizedMessage());
+		}
+	}
+
+
+	/**
 	 * Test "ConvertAttributeToTextOperation".
 	 */
 	public void testConvertAttributeToTextOperation() {
@@ -256,29 +372,8 @@
 		ContextWrapper wrapper = null;
 		try {
 			wrapper = getDocumentContext("/WebContent/Test_TransformOperations.jsp", 620);
-			IStructuredDocumentContext context = wrapper.getContext();
-            IDOMContextResolver resolver =
-                IStructuredDocumentContextResolverFactory.INSTANCE.
-                    getDOMContextResolver(context);
-
-            //get Element
-            Node node = resolver.getNode();
-            assertTrue(node instanceof Element);
-            assertEquals("h", node.getPrefix());
-            assertEquals("commandLink", node.getLocalName());
-            Element element = (Element)node;
-
-            //get IDOMDocument
-            IStructuredModel model = wrapper.getModel();
-            assertTrue(model instanceof IDOMModel);
-            IDOMDocument document = ((IDOMModel)model).getDocument();
-            assertNotNull(document);
-
-            //get ITagConverter instance
-            ITagConverter tagConverter = DTManager.getInstance().getTagConverter(
-            		element,
-            		IConverterFactory.MODE_DESIGNER,
-            		document);
+			ITagConverter tagConverter = 
+				getTagConverter(wrapper, "h", "commandLink", IConverterFactory.MODE_DESIGNER);
             assertNotNull(tagConverter);
 
             //invoke ITagConverter instance
@@ -519,42 +614,16 @@
 		ContextWrapper wrapper = null;
 		try {
 			wrapper = getDocumentContext("/WebContent/Test_TransformOperations.jsp", docOffset);
-			IStructuredDocumentContext context = wrapper.getContext();
-            IDOMContextResolver resolver =
-                IStructuredDocumentContextResolverFactory.INSTANCE.
-                    getDOMContextResolver(context);
+			ITagConverter tagConverter =
+				getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
 
-            //get Element
-            Node node = resolver.getNode();
-            if (
-            		node instanceof Element &&
-            		node.getPrefix().equals(prefix) &&
-            		node.getLocalName().equals(localName)) {
-
-            	Element element = (Element)node;
-
-	            //get IDOMDocument
-	            IStructuredModel model = wrapper.getModel();
-	            if (model instanceof IDOMModel) {
-		            IDOMDocument document = ((IDOMModel)model).getDocument();
-		            if (document != null) {
-		
-			            //get ITagConverter instance
-			            ITagConverter tagConverter = DTManager.getInstance().getTagConverter(
-			            		element,
-			            		IConverterFactory.MODE_DESIGNER,
-			            		document);
-			            if (tagConverter != null) {
-			
-				            //invoke ITagConverter instance
-				            tagConverter.convertRefresh(null);
-				
-				            //get result element
-				            resultElement = tagConverter.getResultElement();
-			            }
-		            }
-	            }
-            }
+			if (tagConverter != null) {
+				//invoke ITagConverter instance
+				tagConverter.convertRefresh(null);
+	
+				//get result element
+				resultElement = tagConverter.getResultElement();
+			}
 		} finally {
 			if (wrapper != null) {
 				wrapper.dispose();
@@ -563,6 +632,40 @@
 		return resultElement;
 	}
 
+	private ITagConverter getTagConverter(ContextWrapper wrapper, String prefix,
+			String localName, int mode) throws Exception {
+		ITagConverter tagConverter = null;
+		IStructuredDocumentContext context = wrapper.getContext();
+		IDOMContextResolver resolver =
+			IStructuredDocumentContextResolverFactory.INSTANCE.
+				getDOMContextResolver(context);
+
+		//get Element
+		Node node = resolver.getNode();
+		if (node instanceof Element
+				&& node.getPrefix().equals(prefix)
+				&& node.getLocalName().equals(localName)) {
+
+			Element element = (Element)node;
+
+			//get IDOMDocument
+			IStructuredModel model = wrapper.getModel();
+			if (model instanceof IDOMModel) {
+				IDOMDocument document = ((IDOMModel)model).getDocument();
+				if (document != null) {
+	
+					//get ITagConverter instance
+					tagConverter = DTManager.getInstance().getTagConverter(
+							element,
+							mode,
+							document);
+				}
+			}
+		}
+
+		return tagConverter;
+	}
+
     private ContextWrapper getDocumentContext(String path, int offset) throws Exception {
         IProject project = webProjectTestEnv.getTestProject();
         IFile jspFile = project.getFile(new Path(path));
@@ -597,5 +700,4 @@
             model.releaseFromRead();
         }
     }
-
 }
