[320963] Markup Validator is flagging end-tag omissible elements
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java
index d0ee221..35040b2 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2009 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 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
@@ -37,11 +37,15 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.eclipse.wst.xml.core.internal.document.ModelParserAdapter;
+import org.eclipse.wst.xml.core.internal.document.ModelParserAdapterExtension;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.Logger;
import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
@@ -473,6 +477,15 @@
}
if (!selfClosed && (tagName != null)) {
+ IDOMDocument document = (IDOMDocument) xmlNode.getOwnerDocument();
+ if (document != null) {
+ Object adapter = document.getAdapterFor(ModelParserAdapter.class);
+ if ((adapter instanceof ModelParserAdapterExtension) && (xmlNode instanceof Element)) {
+ if (((ModelParserAdapterExtension)adapter).isEndTagOmissible((Element) xmlNode)) {
+ return;
+ }
+ }
+ }
Object[] args = {tagName};
String messageText = NLS.bind(XMLUIMessages.Missing_end_tag_, args);
diff --git a/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html b/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
index fc6828a..a8d2c32 100644
--- a/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
+++ b/features/org.eclipse.wst.xml_ui.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html
@@ -24,6 +24,7 @@
<p>Bug <a href='https://bugs.eclipse.org/312307'>312307</a>. [validation] ValidatorStrategy triggering unwanted plug-in activation</p>
<p>Bug <a href='https://bugs.eclipse.org/319048'>319048</a>. Utility code may leak Image handles</p>
<p>Bug <a href='https://bugs.eclipse.org/320322'>320322</a>. [validation] JSP source validators running even when respective batch validators have been turned off</p>
+<p>Bug <a href='https://bugs.eclipse.org/320963'>320963</a>. Markup Validator is flagging end-tag omissible elements</p>
</body>
</html>
diff --git a/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties b/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
index 4c3e00e..c1dacab 100644
--- a/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
+++ b/features/org.eclipse.wst.xml_ui.feature.patch/feature.properties
@@ -38,6 +38,7 @@
Bug https://bugs.eclipse.org/312307 [validation] ValidatorStrategy triggering unwanted plug-in activation\n\
Bug https://bugs.eclipse.org/319048 Utility code may leak Image handles\n\
Bug https://bugs.eclipse.org/320322 [validation] JSP source validators running even when respective batch validators have been turned off\n\
+Bug https://bugs.eclipse.org/320963 Markup Validator is flagging end-tag omissible elements\n\
\n\
# "copyright" property - text of the "Feature Update Copyright"