Refine pattern representation in XML.

Short and more readable XML notation for patterns was added.