IDEA-70554 HTML tags not allowed for XHTML Mobile 1.2

contexts for recursive entity resolving
This commit is contained in:
Dmitry Avdeev
2012-03-29 13:44:01 +04:00
parent 61fb82bc94
commit 0380bb9282
3 changed files with 8 additions and 9 deletions
@@ -55,6 +55,8 @@ public class InternalResourceProvider implements StandardResourceProvider{
impl.addInternalResource("http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd", "xhtml-mobile/xhtml-mobile10-flat.dtd");
impl.addInternalResource("http://www.wapforum.org/DTD/xhtml-mobile12.dtd", "xhtml-mobile/xhtml-mobile12.dtd");
impl.addInternalResource("http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd", "xhtml-mobile/xhtml-mobile12.dtd");
// svg and mathML
impl.addIgnoredResource(HtmlUtil.MATH_ML_NAMESPACE);
impl.addIgnoredResource(HtmlUtil.SVG_NAMESPACE);
@@ -105,7 +105,8 @@ public class XmlEntityDeclImpl extends XmlElementImpl implements XmlEntityDecl,
}
public PsiElement parse(PsiFile baseFile, int context, final XmlEntityRef originalElement) {
PsiElement dependsOnElement = getValueElement(baseFile);
PsiElement dep = XmlElement.DEPENDING_ELEMENT.get(getParent());
PsiElement dependsOnElement = getValueElement(dep instanceof PsiFile ? (PsiFile)dep : baseFile);
String value = null;
if (dependsOnElement instanceof XmlAttributeValue) {
XmlAttributeValue attributeValue = (XmlAttributeValue)dependsOnElement;
@@ -55,7 +55,10 @@ import com.intellij.psi.impl.source.xml.XmlEntityRefImpl;
import com.intellij.psi.scope.processor.FilterElementProcessor;
import com.intellij.psi.search.PsiElementProcessor;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.util.*;
import com.intellij.psi.util.CachedValue;
import com.intellij.psi.util.CachedValueProvider;
import com.intellij.psi.util.CachedValuesManager;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.*;
import com.intellij.util.*;
import com.intellij.util.containers.ContainerUtil;
@@ -632,14 +635,7 @@ public class XmlUtil {
if (element instanceof XmlEntityRef) {
XmlEntityRef ref = (XmlEntityRef)element;
//if ("Number.datatype".equals(ref.getText().substring(1, ref.getTextLength() - 1))) {
// int a = 1;
//}
PsiElement newElement = parseEntityRef(targetFile, ref, true);
//if (newElement == null) {
// System.out.println("No image for :" + ref.getText());
// return true;
//}
while (newElement != null) {
if (!processElement(newElement, deepFlag, wideFlag, processIncludes)) return false;