def METHOD_NAME(rule, idr):
    """ treat rule to be displayed as LT grammar XML
    XML format as:
        <rule>
        <pattern>
        <marker><token>ثلاثة</token></marker>
        <token postag='NFP'/>           
        </pattern>          
        <message>أتقصد <suggestion>ثلاث</suggestion>؟</message>
        الاسم المؤنث يسبق بعدد مذكر
        <example correction="ثلاثة"><marker>ثلاث</marker>أولاد</example>
        <example correction="ثلاث"><marker>ثلاثة</marker>بنات</example>
    </rule>
    input format is 
        rule['pattern']      ;
        rule['suggestions']    
        rule['message']        ;
        rule['wrong_example']  ;
        rule['correct_example'];    
    """
    pattern, message = treat_pattern(rule['pattern'], rule['suggestions'], rule['message'])
    example = treat_example(rule['wrong_example'], rule['correct_example'])
    text = u"""\t<rule id ='unsorted%03.d'>