Define () { final XmlAttributeValue value = getName().getXmlAttributeValue(); if (value == null) return null; final String name = getReferencedName(); if (name == null) { return null; } final RngGrammar scope = getScope(); if (scope == null) { return null; } final Set<Define> defines = DefinitionResolver.resolve(scope, name); // TODO: honor combine & return virtual element if defines.size() > 1 return defines != null && defines.size() > 0 ? defines.iterator().next() : null; }