SunRav BookEditor :: Loops

Loops


Syntax:

<repeat name="loop name"></repeat  name="loop name" >


Loops represent the Pascal/C while loop and  let SunRav BookEditor process the block zero or more times.


Loop

Description

<repeat name="ITEMS">

<ITEM>

  loop body

</ITEM>

</repeat name="ITEMS">

Run through all chapters of a book.

<repeat name="SECTIONS">

<SECTION>

  loop body

</SECTION>

</repeat name="SECTIONS">

Run through all (only 2 in the current version) columns of a book TOC.


Example

<repeat name="ITEMS">

<ITEM>

<repeat name="SECTIONS">

<SECTION>

<if name="SectionIndexIs" eq="1">

<macro name="CURITEMTITLE"/> // Chapter title

<else name="SectionIndexIs"/>

<macro name="CURITEMID"/> // Chapter ID

</if name="SectionIndexIs">

</SECTION>

</repeat name="SECTIONS">

</ITEM>

</repeat name="ITEMS">