<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Oleg,</p>
    <p>as Pavol already said, the main problem was the "<" character
      which must be escaped. This was quite invisible even for me.<br>
    </p>
    <p>I was able to rewrite your expression part to be more "groovy":</p>
    <p>(source and target are as before)</p>
    <p><br>
    </p>
    <p>tmp = basic.stringify(description)<br>
      ar1 = ['test1', 'test2']<br>
      ar2 = ['replace1', 'replace2']<br>
      for( i = 0; i &lt; ar1.size() ; i++)<br>
      {<br>
      tmp = tmp?.replace(ar1[i],ar2[i]);<br>
      }<br>
      return tmp</p>
    <p>And it seems to work:</p>
    <p>before: abc test1 def test2</p>
    <p>after: abc replace1 def replace2<br>
    </p>
    <p>Regards,</p>
    <p>Ivan<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 12/06/2016 08:27 AM, oleg okunev
      wrote:<br>
    </div>
    <blockquote cite="mid:1481009256.894536747@f186.i.mail.ru"
      type="cite">
      okey...<br>
      may be you can help with loop in expression:<br>
      <br>
      <p><source><br>
        <c:path>$user/description</c:path><br>
        </source></p>
      <p><expression><br>
        <script><br>
        <code><br>
        ar1 = new ArrayList ('test1','test2')<br>
        ar2 = new ArrayList ('replacetest1', 'replacetest2')<br>
        <br>
        for( i = 0; i < ar1.size() ; i++)<br>
        {<br>
        description= description.replace(ar1[i],ar2[i]);<br>
        }<br>
        return description<br>
        <br>
        </code><br>
        </script><br>
        </expression><br>
      </p>
      <p><target><br>
        <c:path>$user/description</c:path><br>
        </target></p>
      <br>
      But it show error <strong>element parse error: Error: invalid
        tagName</strong><br>
      <br>
      Whats wrong?<br>
      may be it helps me with translit<br>
      <br>
      <br>
      <blockquote style="border-left:1px solid #0857A6; margin:10px;
        padding:0 0 0 10px;"> Пятница, 2 декабря 2016, 11:39 +03:00 от
        Radovan Semancik <a class="moz-txt-link-rfc2396E" href="mailto:radovan.semancik@evolveum.com"><radovan.semancik@evolveum.com></a>:<br>
        <br>
        <div id="">
          <div class="js-helper js-readmsg-msg">
            <style type="text/css"></style>
            <div> <base target="_self" href="https://e.mail.ru/">
              <div id="style_14806681110000000552_BODY">
                <div>Hi,<br>
                  <br>
                  There is no easy way.<br>
                  <br>
                  The normalization was originally intended for
                  international alphabet support. E.g. it was expected
                  that we could transliterate cyrillic words to latin.
                  However, currently alphabets of all the midpoint
                  subscribers are latin-based. Therefore current
                  midPoint normalizer only support conversion of
                  latin-based national characters and the cyrillic
                  transliteration was never implemented. And currently
                  we have other development priorities. Our priorities
                  are focused on improving the life of midPoint
                  subscribers. Therefore unless we get any substantial
                  subscription from the non-latin-based customer we have
                  no plans to change that. I'm sorry.<br>
                  <br>
                  <pre cols="72">-- 
Radovan Semancik
Software Architect
evolveum.com</pre>
                  <br>
                  <br>
                  On 12/02/2016 08:58 AM, oleg okunev wrote:<br>
                </div>
                <blockquote
                  cite="mid:1480665526.501852048@f372.i.mail.ru"
                  type="cite"> Morning!<br>
                  <br>
                  i have successefully test OrgSync Story Test... with
                  English names <br>
                  <br>
                  BUT<br>
                  when i begin test with russian names i get problem!<br>
                  <br>
                  <p>Conflicting object already exists (violated
                    constraint
                    'uc_org_name')(orgType=PPV(String:replicated);
                    {<a moz-do-not-send="true"
                      href="http://midpoint.evolveum.com/xml/ns/story/orgsync/ext"
                      target="_blank">http://midpoint.evolveum.com/xml/ns/story/orgsync/ext</a>}orgpath=PPV(String:<strong><span
                        style="color: rgb(191, 0, 0);"
                        data-mce-style="color: #bf0000;">Фольклёр/Сказки</span></strong>);
                    ) <br>
                    in expression in mapping 'Org-org mapping' in
                    objectTemplate:10000000-0000-0000-0000-000000000231(Org
                    Template)<br>
                    <br>
                    midpoint save first org "<span style="color:
                      #bf0000;" data-mce-style="color: #bf0000;"><strong>Сторонние
                        Организации</strong></span> " and make name_norm
                    only space or just empty <br>
                    so all next names trying to create get same emty
                    name_norm and fail to create(((<br>
                    <br>
                    <strong>is any way to fix that?????</strong><br>
                    <br>
                    <br>
                  </p>
                  <p>costcenter | displayorder | locality_norm        
                     | locality_orig                     | name_norm |
                    name_orig    | tenant | oid<br>
------------+--------------+------------------------------+-------------------------------+-----------+------------------------------------+--------+--------------------------------------<br>
                                    |                  |                
                                          |                            
                               | p0002      | P0002                    
                                |            |
                    00000000-8888-6666-0000-200000000002<br>
                    black       |                  |                    
                                      |                                
                           <span style="color: rgb(191, 0, 0);"
                      data-mce-style="color: #bf0000;"><strong>|        
                                |</strong> <strong>Сторонние
                        Организации</strong></span>  |            |
                    040346cb-88ce-4012-8d52-93eb1e1d2a4f<br>
                    black       |                  |                    
                                      |                                
                           |child          | CHILD                      
                             | f          |
                    2681372b-3a8b-442d-861c-fc6fa0229471<br>
                                    |                  |                
                                          |                            
                               |ibpm test   | IBPM Test                
                             |            |
                    828586f3-1444-42b9-b11a-e012c066099b<br>
                                    |                  |                
                                          |                            
                               |abbwin      | ABB-WIN                  
                            |            |
                    f226c7be-dad5-4415-b4f7-d987fb3856bd<br>
                                    |                  |       kazan    
                                     | Kazan                          
                     |<span style="color: rgb(191, 0, 0);"><strong> fil
                         </strong>  </span>           | <span
                      style="color: rgb(191, 0, 0);"><strong>Домен FIL  </strong>
                    </span>                      |            |
                    e62d247f-bd94-425a-9d82-63927de5b569</p>
                  <p>------------+--------------+------------------------------+-------------------------------+-----------+-----------------------+--------+--------------------------------------</p>
                  P.S. "<strong style="color: #bf0000;"
                    data-mce-style="color: #bf0000;">Домен FIL</strong>"
                  became " fil". midpoint erase all russian letters. <br>
                  <fieldset></fieldset>
                  <br>
                  <pre wrap="">_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
                </blockquote>
                <br>
                <br>
              </div>
              <div>_______________________________________________<br>
                midPoint mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                  target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
              </div>
              <base target="_self" href="https://e.mail.ru/"> </div>
          </div>
        </div>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>