xml pattern builder, work in progress