diff -r 2bd6f7cb537b -r 6f665be3cc67 xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/AbstractSchemaSearchVisitor.java --- a/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/AbstractSchemaSearchVisitor.java Thu Oct 02 19:54:58 2008 +0400 +++ b/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/AbstractSchemaSearchVisitor.java Wed Oct 01 23:22:38 2008 +0200 @@ -54,11 +54,6 @@ import org.netbeans.modules.xml.xam.dom. */ public abstract class AbstractSchemaSearchVisitor extends DefaultSchemaVisitor { - - // Indicates if it necessary to look the global objects only. - // It is used when the schema is the parent of searching. - protected boolean lookGlobalOnly = false; - public AbstractSchemaSearchVisitor() { } @@ -208,27 +203,22 @@ public abstract class AbstractSchemaSear // visitChildren(ce); } - @Override - public void visit(GlobalComplexType gct) { - if (!lookGlobalOnly) { - visitChildren(gct); - } - } - - @Override - public void visit(LocalComplexType lct) { - if (!lookGlobalOnly) { - visitChildren(lct); - } - } - - @Override - public void visit(GlobalGroup gg) { - if (!lookGlobalOnly) { - visitChildren(gg); - } - } - + + @Override + public void visit(GlobalComplexType gct) { + visitChildren(gct); + } + + @Override + public void visit(LocalComplexType lct) { + visitChildren(lct); + } + + @Override + public void visit(GlobalGroup gg) { + visitChildren(gg); + } + @Override public void visit(Redefine r) { visitChildren(r); diff -r 2bd6f7cb537b -r 6f665be3cc67 xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/CachingSchemaSearchVisitor.java --- a/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/CachingSchemaSearchVisitor.java Thu Oct 02 19:54:58 2008 +0400 +++ b/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/CachingSchemaSearchVisitor.java Wed Oct 01 23:22:38 2008 +0200 @@ -160,14 +160,7 @@ public class CachingSchemaSearchVisitor } else if (sc instanceof ComplexType) { visitChildren(sc); } else if (sc instanceof Schema) { - // Look for a global schema object - lookGlobalOnly = true; - try { - visitChildren(sc); - } finally { - lookGlobalOnly = false; - } - + visitChildren(sc); } else { // Other elements can't containg nested elements or attributes } diff -r 2bd6f7cb537b -r 6f665be3cc67 xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindAllChildrenSchemaVisitor.java --- a/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindAllChildrenSchemaVisitor.java Thu Oct 02 19:54:58 2008 +0400 +++ b/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindAllChildrenSchemaVisitor.java Wed Oct 01 23:22:38 2008 +0200 @@ -92,14 +92,8 @@ public class FindAllChildrenSchemaVisito } else if (sc instanceof ComplexType) { visitChildren(sc); } else if (sc instanceof Schema) { - // Look for a global schema object - lookGlobalOnly = true; - try { - visitChildren(sc); - } finally { - lookGlobalOnly = false; - } - + // Look for a global schema object + visitChildren(sc); } else { // Other elements can't containg nested elements or attributes } diff -r 2bd6f7cb537b -r 6f665be3cc67 xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindChildrenSchemaVisitor.java --- a/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindChildrenSchemaVisitor.java Thu Oct 02 19:54:58 2008 +0400 +++ b/xml.xpath.ext/src/org/netbeans/modules/xml/xpath/ext/schema/FindChildrenSchemaVisitor.java Wed Oct 01 23:22:38 2008 +0200 @@ -197,14 +197,8 @@ public class FindChildrenSchemaVisitor e visitChildren(sc); } else if (sc instanceof Schema) { - // Look for a global schema object - lookGlobalOnly = true; - try { - visitChildren(sc); - } finally { - lookGlobalOnly = false; - } - +//out("3"); + visitChildren(sc); } else { //out("4");