Smartsite SXML CopyCode image Copy Code
!<!--// Create a random datatable -->
<se:hidden>
    {math.setrandomseed(1, rem="set seed to ensure data is identical for each rendering")}
    {buffer.set(dt, datatable.createempty(Nr,Text))}
    <se:for from="1" to="100">
        <se:lorem save="lorem" unittype="sentence" unitcount="100" skiprows="{math.random(100)}" maxrows="1" rowformat="{this.field(1)}" />
        {datatable.rows.add($dt, this.index(), $lorem)}
    </se:for>
</se:hidden>

<!--// Format the data, give odd and even lines different colors. -->
<se:format inputdata="{buffer.get(dt)}">
    <se:parameters>
        <se:parameter name="format">
            <se:rowformat expression="this.rownumber() % 5 == 0">
                <tr style="background-color: LightCoral">
                    <td>{this.field(nr)}</td>
                    <td>{this.field(text)}</td>
                </tr>
            </se:rowformat>
            <se:rowformat match="odd">
                <tr style="background-color: DeepSkyBlue">
                    <td>{this.field(nr)}</td>
                    <td>{this.field(text)}</td>
                </tr>
            </se:rowformat>
            <se:rowformat>
                <tr style="background-color: FloralWhite">
                    <td>{this.field(nr)}</td>
                    <td>{this.field(text)}</td>
                </tr>
            </se:rowformat>
        </se:parameter>
        <se:parameter name="resultformat">
            <table>
                {this.result()}
            </table>
        </se:parameter>
    </se:parameters>
</se:format>
Example Result CopyCode image Copy Code
!




            <table>
                
                <tr style="background-color: DeepSkyBlue">
                    <td>1</td>
                    <td> Cras vehicula erat id nulla</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>2</td>
                    <td> Vivamus semper, erat at vehicula commodo, sapien nunc eleifend est, sit amet imperdiet arcu leo sit amet ante</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>3</td>
                    <td> Aenean dictum ullamcorper massa</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>4</td>
                    <td> Nulla facilisi</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>5</td>
                    <td> Aliquam et felis</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>6</td>
                    <td> Duis iaculis</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>7</td>
                    <td> In commodo, nisi convallis porttitor viverra, velit nunc accumsan tortor, in placerat mi velit nec neque</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>8</td>
                    <td> Cras posuere</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>9</td>
                    <td> Vestibulum suscipit enim vitae purus</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>10</td>
                    <td> Integer sollicitudin semper arcu</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>11</td>
                    <td> Phasellus eu augue eu nulla pulvinar elementum</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>12</td>
                    <td> Cras vehicula erat id nulla</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>13</td>
                    <td> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>14</td>
                    <td> Mauris euismod arcu vel arcu</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>15</td>
                    <td> Suspendisse malesuada elementum quam</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>16</td>
                    <td> Aliquam et felis</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>17</td>
                    <td> Sed ac erat a quam sagittis viverra</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>18</td>
                    <td> Praesent pulvinar massa sed diam</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>19</td>
                    <td> Sed hendrerit</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>20</td>
                    <td> In tincidunt, pede ullamcorper nonummy tristique, enim odio vulputate nunc, eu ullamcorper mauris sem quis augue</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>21</td>
                    <td> Cras posuere</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>22</td>
                    <td> Donec turpis enim, pellentesque aliquam, euismod vitae, lobortis vel, nulla</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>23</td>
                    <td> Aenean orci</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>24</td>
                    <td> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>25</td>
                    <td> Nam elit</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>26</td>
                    <td> 
Aenean ultrices</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>27</td>
                    <td> Nam elit</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>28</td>
                    <td> Duis vulputate dui</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>29</td>
                    <td> Sed nec turpis</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>30</td>
                    <td> Integer bibendum sapien non velit</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>31</td>
                    <td> Morbi auctor justo et odio</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>32</td>
                    <td> Phasellus ac mi</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>33</td>
                    <td> In tincidunt, pede ullamcorper nonummy tristique, enim odio vulputate nunc, eu ullamcorper mauris sem quis augue</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>34</td>
                    <td> Sed ullamcorper, lorem vel feugiat convallis, dolor lectus laoreet sapien, eu porta diam nulla vitae turpis</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>35</td>
                    <td></td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>36</td>
                    <td> Vestibulum adipiscing libero ac arcu</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>37</td>
                    <td> Quisque aliquet sem quis augue</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>38</td>
                    <td> Aenean pulvinar venenatis lectus</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>39</td>
                    <td> Praesent nec justo eget leo lobortis suscipit</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>40</td>
                    <td> Proin nec erat sit amet nibh hendrerit vestibulum</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>41</td>
                    <td> Lorem ipsum dolor sit amet, consectetuer adipiscing elit</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>42</td>
                    <td></td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>43</td>
                    <td> 
Phasellus tempor libero ut odio</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>44</td>
                    <td> Curabitur cursus tellus et enim</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>45</td>
                    <td> Duis iaculis</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>46</td>
                    <td> Suspendisse malesuada elementum quam</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>47</td>
                    <td> Suspendisse malesuada elementum quam</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>48</td>
                    <td> Aenean dictum ullamcorper massa</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>49</td>
                    <td> Proin luctus molestie eros</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>50</td>
                    <td> In commodo, nisi convallis porttitor viverra, velit nunc accumsan tortor, in placerat mi velit nec neque</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>51</td>
                    <td> Proin nec erat sit amet nibh hendrerit vestibulum</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>52</td>
                    <td> 
Aenean ultrices</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>53</td>
                    <td> In commodo, nisi convallis porttitor viverra, velit nunc accumsan tortor, in placerat mi velit nec neque</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>54</td>
                    <td> 
Phasellus tempor libero ut odio</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>55</td>
                    <td> Curabitur cursus tellus et enim</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>56</td>
                    <td> Nam tellus odio, aliquam nec, elementum eget, venenatis id, ipsum</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>57</td>
                    <td> Cras posuere</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>58</td>
                    <td> Nam pretium, nulla ac condimentum molestie, justo tellus lobortis magna, a convallis lacus ipsum sit amet enim</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>59</td>
                    <td> Aliquam velit velit, rutrum vel, feugiat vel, dignissim et, lacus</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>60</td>
                    <td> Praesent blandit justo sit amet nibh</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>61</td>
                    <td> Integer sollicitudin semper arcu</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>62</td>
                    <td> Integer condimentum imperdiet dolor</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>63</td>
                    <td> Cras dapibus</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>64</td>
                    <td> Proin nulla nisl, tincidunt dignissim, eleifend tincidunt, tempus sed, sem</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>65</td>
                    <td> Nam pretium, nulla ac condimentum molestie, justo tellus lobortis magna, a convallis lacus ipsum sit amet enim</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>66</td>
                    <td> Duis vulputate dui</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>67</td>
                    <td> Nam felis</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>68</td>
                    <td> Vestibulum pharetra</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>69</td>
                    <td></td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>70</td>
                    <td> 
Curabitur ante mi, tincidunt quis, aliquam at, suscipit eu, pede</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>71</td>
                    <td> Nam elit</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>72</td>
                    <td> In nibh mi, venenatis vel, feugiat vel, iaculis a, velit</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>73</td>
                    <td> Vestibulum suscipit enim vitae purus</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>74</td>
                    <td> Duis elementum tortor faucibus leo</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>75</td>
                    <td> Duis iaculis</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>76</td>
                    <td> Etiam semper</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>77</td>
                    <td> Vivamus ante velit, eleifend vitae, nonummy id, aliquet euismod, tellus</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>78</td>
                    <td> Cras lorem nisl, pretium sed, tincidunt quis, varius quis, sapien</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>79</td>
                    <td> Cras posuere</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>80</td>
                    <td> Cras dapibus</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>81</td>
                    <td> Praesent blandit justo sit amet nibh</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>82</td>
                    <td> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>83</td>
                    <td> Aenean pulvinar venenatis lectus</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>84</td>
                    <td> Aenean dictum ullamcorper massa</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>85</td>
                    <td> Donec ullamcorper diam ut lorem</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>86</td>
                    <td> Curabitur cursus tellus et enim</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>87</td>
                    <td> Aenean lectus urna, semper non, viverra ut, pellentesque ut, quam</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>88</td>
                    <td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>89</td>
                    <td> Praesent pulvinar massa sed diam</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>90</td>
                    <td> Curabitur vehicula</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>91</td>
                    <td> Quisque aliquet sem quis augue</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>92</td>
                    <td> Cras lorem nisl, pretium sed, tincidunt quis, varius quis, sapien</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>93</td>
                    <td> Nam pretium, nulla ac condimentum molestie, justo tellus lobortis magna, a convallis lacus ipsum sit amet enim</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>94</td>
                    <td> Phasellus eu augue eu nulla pulvinar elementum</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>95</td>
                    <td> Integer bibendum sapien non velit</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>96</td>
                    <td> In nibh mi, venenatis vel, feugiat vel, iaculis a, velit</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>97</td>
                    <td> 
Curabitur ante mi, tincidunt quis, aliquam at, suscipit eu, pede</td>
                </tr>
            
                <tr style="background-color: FloralWhite">
                    <td>98</td>
                    <td> Praesent sit amet lorem et justo cursus lobortis</td>
                </tr>
            
                <tr style="background-color: DeepSkyBlue">
                    <td>99</td>
                    <td> Vestibulum pharetra</td>
                </tr>
            
                <tr style="background-color: LightCoral">
                    <td>100</td>
                    <td> Cras dapibus</td>
                </tr>
            
            </table>