![]() |
It is really a difficult task to create columns. If you created a proper column you may , , and we shall insert it into our columns database. Then it will be available to some other users of the program . To understand this you should have a brief knowledge of the html A complicated example. Suppose we have the following html file.
We would like to refrain not only the news headings (underlined in red), but also the first few lines of the text accordingly, as well as specify url for the general news definition. Besides we'd like to separate the topics "Main news" and "Events". At first we will pick out main news. Lets create new search pattern and call itmainnews. It should be noted that all news headings are limited by <B> on the left and </B> on the right. News task body is limited as follows: </A> on the left and <P> on the right. The link is limited on the left by <A href= and ">" on the right. The link goes first and then follows by the news heading and its body. All main news are placed between<H3>The main news</H3> and <H3>"Events"</H3> So the fields of the search template are filled out as follows:
While processing the described pattern the program operates as follows: 1. It would find <A href= within the text. 2. It would find ">"within the text. 3. All data between <A href= and ">" is placed n the "link" variable. 4. It would find <B> within the text. 5. It would find </B> within the text. 6. All data between <B> and </B>is placed n the "title" variable. 7. It would find </A> within the text. 8. It would find <P> within the text. 9. The first 50 characters between <B> and </B> are placed by the program in the "body" variable. In case there are less than 50 characters between the search strings, the program would record all data. 10. The program would repeat the steps from 1 to 9 as far as possible. As the result the "link" variable would contain the array variable of the following string: news1.html news2.html news3.html The variable "title" would contain the following: Interesting news Other interesting news Events in the Capital The variable "body" would also contain the following: At the latest sitting of the government it was approved the following… On Sunday morning several leading newspapers announced the following… According to the available info in the Capital soon … The needed information has been found! Now the next step predetermines its output. In order to perform the foregoing one should define the output template. We create the output template. In the "Prolog" field we enter: <H5>Main News</H5><UL> We then fill out the "Epilogue" field: </UL> The template pattern will look like: <LI><A href={mainnews.link}>{mainnews.title}</A><BR>{mainnews.body}</LI> As the result the news column created would show the following:
Let's call it events. We then enter in the "Prolog" field the following data:<H3>Events</H3> "Epilogue" field is left vacant. The pattern body is created in the same manner as the "main news" body: <A href={link}">"{*}<B>{title}</B>{*}</A>{body}<P> After that we create new output template. We then enter in the "Prolog" field the following data: <H5>"Events" </H5><UL> In the "Epilogue" field </UL> the template pattern is defined as follows: <LI><A href={accidents.link}>{accidents.title}</A><BR>{accidents.body}</LI> Note: this output pattern body differs from the previous pattern only the name of the selected search pattern. As the result of the foregoing operations the news column created would show the following:
It is really a difficult task to create columns. If you created a proper column you may , , and we shall insert it into our columns database. Then it will be available to some other users of the program .
|
![]() |
![]() |