//register the binding factory in the context
BindingFactory bindingFactory = new BindingFactoryImpl(bindingLoader);
context.registerComponentInstance(bindingFactory);
//register the element encoder in the context
encoder = new ElementEncoder(bindingWalker, context);
context.registerComponentInstance(encoder);
//register the schema index
context.registerComponentInstance(index);