- for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {
- if (attrs instanceof TopLevelAttribute) {
- TopLevelAttribute attribute = (TopLevelAttribute)attrs;
- if (attribute.getName().equals(ref.getLocalPart()))
- return attribute;
- }
+// for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {
+// if (attrs instanceof TopLevelAttribute) {
+// TopLevelAttribute attribute = (TopLevelAttribute)attrs;
+// if (attribute.getName().equals(ref.getLocalPart()))
+// return attribute;
+// }
+// }
+ SchemaObject obj = _getAttribute(ref);
+ if (obj != null)
+ return obj.getAttribute();
+ if (ref.getNamespaceURI() != null) {
+ for (SchemaConverter sc : converter.getConverter(ref.getNamespaceURI())) {
+ if (sc.base != null) {
+ obj = sc.base._getAttribute(ref);
+ if (obj != null) {
+ return obj.getAttribute();
+ }
+ }
+ }