Smartsite SXML CopyCode image Copy Code
<se:sqlquery sql="select top 10 Nr, Name from FileTypes order by Nr">
    <se:parameters>
        <se:parameter name="format">
 
            <!-- This is the global colformat that will be applied is no other colformat is applicable -->
            <se:colformat trim="right">
                    <td>{this.field()}</td>
            </se:colformat>
 
            <!-- This rowformat will be applied to the first row -->
            <se:rowformat match="first">
                <se:colformat trim="right">
                    <td style="background-color: DeepSkyBlue">{this.field()}</td>
                </se:colformat>
                <se:rowresult trim="right">
                <tr>
                        {this.rowresult()}
                </tr>
                </se:rowresult>
            </se:rowformat>
 
            <!-- This rowformat will be applied to all the other rows -->
            <se:rowformat>
                <se:colformat match="first" trim="right">
                    <td style="background-color: GainsBoro">{this.field()}</td>
                </se:colformat>
                <se:rowresult trim="right">
                <tr>
                        {this.rowresult()}
                </tr>
                </se:rowresult>
            </se:rowformat>
 
        </se:parameter>
    
        <se:parameter name="resultformat">
            <table border="1">
                {this.result()}
            </table>
        </se:parameter>
    </se:parameters>
</se:sqlquery>
Example Result CopyCode image Copy Code
<table border="1">
                
                <tr>
                        
                    <td style="background-color: DeepSkyBlue">1</td>
                    <td style="background-color: DeepSkyBlue">Web Page (.html)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">2</td>
                    <td>Cascading Style Sheet (.css)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">3</td>
                    <td>Plain Text (.txt)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">4</td>
                    <td>XML (.xml)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">5</td>
                    <td>GIF Image (.gif)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">6</td>
                    <td>JPEG Image (.jpg)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">7</td>
                    <td>PNG Image (.png)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">8</td>
                    <td>Word document (.doc)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">9</td>
                    <td>Javascript (.js)</td>
                </tr>
                <tr>
                        
                    <td style="background-color: GainsBoro">10</td>
                    <td>XHTML Web Page (.html)</td>
                </tr>
            </table>