IDEA-67497 XSLT: "Unused XML schema declaration" inspection: false positive for namespace declaration used in stylesheet object qualified name

This commit is contained in:
sweinreuter
2011-04-14 19:26:59 +02:00
parent 8d77cdf1b3
commit c90e673699
2 changed files with 15 additions and 0 deletions
@@ -15,6 +15,8 @@
*/
package org.intellij.lang.xpath.xslt;
import com.intellij.codeInsight.daemon.impl.analysis.XmlUnusedNamespaceInspection;
import com.intellij.javaee.ExternalResourceManagerEx;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Computable;
@@ -34,6 +36,7 @@ public class XsltHighlightingTest extends TestBase {
protected void setUp() throws Exception {
super.setUp();
myFixture.enableInspections(XsltStuffProvider.INSPECTION_CLASSES);
ExternalResourceManagerEx.getInstanceEx().addIgnoredResource("urn:my");
}
public void xtestBackwardIncludedVariable() throws Throwable {
@@ -112,6 +115,11 @@ public class XsltHighlightingTest extends TestBase {
doXsltHighlighting();
}
public void testTemplateWithPrefix() throws Throwable {
myFixture.enableInspections(XmlUnusedNamespaceInspection.class);
doXsltHighlighting();
}
public void xtestPerformance() throws Throwable {
myFixture.configureByFile(getTestFileName() + ".xsl");
final long l = runHighlighting();
@@ -0,0 +1,7 @@
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:pf1="urn:my">
<xsl:template name="pf1:name1">
<xsl:call-template name="pf1:name1" />
</xsl:template>
</xsl:transform>