refFun) {
+ if (element == null) {
+ return PsiReference.EMPTY_ARRAY;
+ }
String text = element.getText();
String urls = StringUtil.stripQuotesAroundValue(text);
StringTokenizer tokenizer = new StringTokenizer(urls);
diff --git a/xml/tests/src/com/intellij/html/MicrodataCompletionTest.java b/xml/tests/src/com/intellij/html/MicrodataCompletionTest.java
index d621b286d092..9a0c19ed5542 100644
--- a/xml/tests/src/com/intellij/html/MicrodataCompletionTest.java
+++ b/xml/tests/src/com/intellij/html/MicrodataCompletionTest.java
@@ -214,4 +214,29 @@ public class MicrodataCompletionTest extends CodeInsightFixtureTestCase {
"name", "nickname", "photo", "title", "role", "url", "affiliation", "friend", "acquaintance", "address"
);
}
+
+ public void testPropValueNestedScopesDifferentTrees() throws Throwable {
+ final VirtualFile personFile = myFixture.copyFileToProject("Person.html");
+ final VirtualFile addressFile = myFixture.copyFileToProject("Address.html");
+ ApplicationManager.getApplication().runWriteAction(new Runnable() {
+ @Override
+ public void run() {
+ ExternalResourceManager.getInstance().addResource("http://data-vocabulary.org/Person", personFile.getPath());
+ ExternalResourceManager.getInstance().addResource("http://data-vocabulary.org/Address", addressFile.getPath());
+ }
+ });
+ doTestInHtml("\n" +
+ " name is ann\n" +
+ " role is smth\n" +
+ " \n" +
+ " spb\n" +
+ " \n" +
+ "
\n" +
+ "\n" +
+ " \">russia\n" +
+ "
",
+ "street-address", "locality", "region", "postal-code", "country-name"
+ );
+ }
}