Thursday, 28 January 2016

Cross Reference linking source code in epsilon extension language (eel)

Long time ago, I was working for a project based on e-book conversion. The main pain area of the project was bookmark or we can say cross reference linking. It was very time consuming and almost 30-40% time consuming out of 100% so I have tried to writing an source code in epsilon extension language "eel" and I succeed on writing this code and it reduces almost 20-30% of our production time. I did not get any thing from my company for writing this source code but and letting them use it but it makes me feel happy. Couple days ago one of my friend want me to write a source code for cross reference linking so I decided not to writing exact source code but I will share this source code which is similar to his requirement so here we go.

Dedicated to Vignesh Kumar, please use this source code for your requirement, if you don't understand anything please let me know I will write exact code you need.

command internalbib1()
{
    int a, b, c, d, e, f;
    char dest[1000], src[1000], *pet=".+<min>", linkendvalue[1000];
    while(search(1, "<link linkend=\"\">"))
    {
        search(-1, "<link linkend=\"\">");
        search(1, "<link linkend=\"\">");
        point=point-17;
        set_mark();
        search(1, "</link>");
        narrow_to_region();
        search(1, ">");
        a=point;
        search(1, ",");
        b=point-1;
        grab(a,b, src);
        strcat(src, pet);
        re_search(1, "([0-9][0-9][0-9][0-9])");
        c=point;
        d=point-4;
        grab(c,d, dest);
        strcat(src, dest);
        widen_buffer();
        next_window();
        goto_beginning();
        if(re_search(1, src)==1)
        {
            re_search(-1, src);
            search(-1, "xml:id=\"");
            e=point+8;
            search(1, "\">");
            f=point-2;
            grab(e,f, linkendvalue);
            previous_window();
            search(-1, "<link");
            search(1, "linkend=\"");
            stuff(linkendvalue);

            search(-1, "linkend=\"\"");

        }
        else
        {
            previous_window();
        }
    }
}

This source code belongs to me and everyone can use it freely, there is no issue to use this source code.

9 comments:

  1. thanks guru.. its work superbb

    ReplyDelete
  2. Guru pls share your knowledge and source code like this..
    i am new for xml your epsilon tips very useful to me...
    thanks for your videos and clear scree short...
    Money is more important for life, but helping mind people like you is GOD's Gift. tks

    ReplyDelete
    Replies
    1. @Elvaprabhu : you can get more epsilon related tutorial in facebook.com/step2victorypath

      Delete
  3. Thank you @Elva for your kind response on my tutorials, sure I will try to add more exercise in this blog. BTW where are you from and what are your expectations from me that I can write here?

    ReplyDelete
  4. Thanks Kamlesh for mentioning me in this article.

    ReplyDelete
  5. hi sir, thanks fr sharing your knowledge, how to make a code for references sir, thank you.

    ReplyDelete
  6. Hi sir, how to use source code please share a video

    ReplyDelete
  7. hi sir, how to find a total references and code this reference in epsilon please share some samples,

    ReplyDelete
  8. Thanks... It's working 👍

    ReplyDelete