- *match_syntax = el->syntax;
- if (el->identifier)
- *match_schema = el->identifier;
- else
- *match_schema = 0;
- if (backend_schema)
- {
- if (el->backend_name)
- {
- if (*el->backend_name)
- *backend_schema = el->backend_name;
- }
- else if (el->name)
- *backend_schema = el->name;
- else
- *backend_schema = schema;
- }
- if (backend_syntax)
+ if (!el_best || schema_ok == 2)
+ el_best = el;
+ }
+ }
+ if (el_best)
+ {
+ el = el_best;
+ *match_syntax = el->syntax;
+ if (el->identifier)
+ *match_schema = el->identifier;
+ else
+ *match_schema = 0;
+ if (backend_schema)
+ {
+ if (el->backend_name)