*
* TODO: this is not the proper place for this class to be in.
*/
public static Transducer createTransducer(RuntimeNonElementRef ref) {
Transducer t = ref.getTarget().getTransducer();
RuntimePropertyInfo src = ref.getSource();
ID id = src.id();
if(id==ID.IDREF)
return RuntimeBuiltinLeafInfoImpl.STRING;
if(id==ID.ID)
t = new IDTransducerImpl(t);
MimeType emt = src.getExpectedMimeType();
if(emt!=null)
t = new MimeTypedTransducer(t,emt);
if(src.inlineBinaryData())
t = new InlineBinaryTransducer(t);
if(src.getSchemaType()!=null) {
if (src.getSchemaType().equals(createXSSimpleType())) {
return RuntimeBuiltinLeafInfoImpl.STRING;
}
t = new SchemaTypeTransducer(t,src.getSchemaType());
}
return t;
}