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">
                                
            <!--// Print a caption row every 5 lines -->
            <se:captionformat expression="this.rownumber() % 5 == 1">
                <se:colformat trim="right">
                    <th>{this.colname()}</th>
                </se:colformat>
                <se:rowresult trim="right">
                <tr>
                        {this.rowresult()}
                </tr>
                </se:rowresult>
            </se:captionformat>
 
            <!--// Format each row with this rowformat -->
            <se:rowformat>
                <se:colformat trim="right">
                    <td>{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>
                        
                    <th>Nr</th>
                    <th>Name</th>
                </tr>
                <tr>
                        
                    <td>1</td>
                    <td>Web Page (.html)</td>
                </tr>
                <tr>
                        
                    <td>2</td>
                    <td>Cascading Style Sheet (.css)</td>
                </tr>
                <tr>
                        
                    <td>3</td>
                    <td>Plain Text (.txt)</td>
                </tr>
                <tr>
                        
                    <td>4</td>
                    <td>XML (.xml)</td>
                </tr>
                <tr>
                        
                    <td>5</td>
                    <td>GIF Image (.gif)</td>
                </tr>
                <tr>
                        
                    <th>Nr</th>
                    <th>Name</th>
                </tr>
                <tr>
                        
                    <td>6</td>
                    <td>JPEG Image (.jpg)</td>
                </tr>
                <tr>
                        
                    <td>7</td>
                    <td>PNG Image (.png)</td>
                </tr>
                <tr>
                        
                    <td>8</td>
                    <td>Word document (.doc)</td>
                </tr>
                <tr>
                        
                    <td>9</td>
                    <td>Javascript (.js)</td>
                </tr>
                <tr>
                        
                    <td>10</td>
                    <td>XHTML Web Page (.html)</td>
                </tr>
            </table>