Changes for implementing KeywordExternalReferenceResolver and tests