if (accessor != null) {
Object value = eval(accessor, source);
if (value instanceof Boolean) {
String val = ((Boolean)value).booleanValue() ? "yes" : "no";
ObjectContext valueContext = new ObjectContext(val);
Serializer ser = new SimpleElementSerializer(Constants.DRAFT);
ser.serialize(val, valueContext, context);
} else {
ObjectContext valueContext = new ObjectContext(value);
context.serialize(value, valueContext);
}
}