<commit_before><!--
  Copyright (C) 2009 Orbeon, Inc.

  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU Lesser General Public License as published by the Free Software Foundation; either version
  2.1 of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
  -->
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:widget="http://orbeon.org/oxf/xml/widget"
    xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:xi="http://www.w3.org/2001/XInclude">

    <xhtml:head>
        <xhtml:title>Datatable</xhtml:title>

        <xi:include href="datatable-unittest-model.xml"/>
        
        <xforms:model id="lb">
            <xforms:instance id="eventList-instance" src="oxf:/apps/logicblox-sandbox/events.xml"/>
            <xforms:instance id="current-transactions-instancecurrent-transactions-instance"
                src="oxf:/apps/logicblox-sandbox/transactions.xml"/>
            <!-- Instance to control the checkbox-->
            <xforms:instance id="tempInstance">
                <instance xmlns="">
                    <viewTransactions>false</viewTransactions>
                </instance>
            </xforms:instance>
            
            <xforms:bind nodeset="instance('tempInstance')">
                <xforms:bind nodeset="viewTransactions" type="xs:boolean"/>
            </xforms:bind>
        </xforms:model>

        <xhtml:link type="text/css" rel="stylesheet" href="/ops/yui/logger/assets/logger.css"/>
        <xhtml:script type="text/javascript" src="/ops/yui/logger/logger.js"/>
        <xhtml:script type="text/javascript" src="/ops/yui/yuitest/yuitest.js"/>
        <xhtml:script type="text/javascript" src="/xbl/orbeon/datatable/datatable-unittest.js"/>
        <xhtml:script type="text/javascript" src="/xbl/orbeon/datatable/datatable-unittest-lib.js"/>

    </xhtml:head>
    <xhtml:body>

        <xhtml:fieldset>
            <xhtml:legend>Datatable test events</xhtml:legend>
            <xhtml:p>
                <xforms:group ref="instance('controls')">
                    <xforms:input ref="maxLength" id="maxLength">
                        <xforms:label>Maximum length: </xforms:label>
                        <xforms:help>Used by tests that check instance updates.</xforms:help>
                    </xforms:input>
                </xforms:group>
            </xhtml:p>
            <xhtml:p>
                <xforms:group ref="instance('controls')">
                    <xforms:input ref="show" id="show">
                        <xforms:label>Show: </xforms:label>
                        <xforms:help>Used by tests that hide/show cycles.</xforms:help>
                    </xforms:input>
                </xforms:group>
            </xhtml:p>
            <xhtml:ol>
                <xhtml:li>
                    <xforms:trigger appearance="minimal" id="open-all">
                        <xforms:label>Open all</xforms:label>
                        <xforms:dispatch ev:event="DOMActivate" target="my-accordion"
                            name="fr-accordion-toggle-all">
                            <xxforms:context name="selected" select="true()"/>
                        </xforms:dispatch>
                    </xforms:trigger>
                </xhtml:li>
                <xhtml:li>
                    <xforms:trigger appearance="minimal" id="close-all">
                        <xforms:label>Close all</xforms:label>
                        <xforms:dispatch ev:event="DOMActivate" target="my-accordion"
                            name="fr-accordion-toggle-all">
                            <xxforms:context name="selected" select="false()"/>
                        </xforms:dispatch>
                    </xforms:trigger>
                </xhtml:li>
            </xhtml:ol>
        </xhtml:fieldset>

        <fr:accordion class="fr-accordion-lnf" id="my-accordion">
            <!-- <fr:case selected="true" id="_new">
                <fr:label>#new: style attributes are not properly copied</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314292&amp;group_id=168&amp;atid=350207"
                            >314292</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-new">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true">A header (that shouldn't display)</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <span style="display:none">
                                            <xforms:output value="position()"/>
                                        </span>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>-->
            <fr:case selected="true" id="_314459">
                <fr:label>#314459:Paginated datatables: the page number is not properly set when the
                    datatable is hidden (by an empty context) and show again.</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314459&amp;group_id=168&amp;atid=350207"
                            >314459</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('lorem')[instance('controls')/show = 'true']">
                        <fr:datatable id="_314459-table" paginated="true" rowsPerPage="5">
                            <xhtml:thead>
                                <xhtml:tr>
                                    <xhtml:th>Text</xhtml:th>
                                </xhtml:tr>
                            </xhtml:thead>
                            <xhtml:tbody>
                                <xforms:repeat
                                    nodeset="line[string-length() &lt; xxforms:instance('controls')/maxLength cast as xs:integer]">
                                    <xhtml:tr>
                                        <xhtml:td>
                                            <xforms:output value="."/>
                                        </xhtml:td>
                                    </xhtml:tr>
                                </xforms:repeat>
                            </xhtml:tbody>
                        </fr:datatable>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314415">
                <fr:label>#314415:Datatable within an xforms:repeat are not properly initialized
                    when iterations are deleted and added again</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314415&amp;group_id=168&amp;atid=350207"
                            >314415</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('lorem')[instance('controls')/show = 'true']">
                        <xforms:repeat nodeset="line[position() = (1, 2)]">
                            <fr:datatable id="_314415-table" scrollable="both" width="500px"
                                height="200px">
                                <xhtml:thead>
                                    <xhtml:tr>
                                        <xhtml:th>Text</xhtml:th>
                                    </xhtml:tr>
                                </xhtml:thead>
                                <xhtml:tbody>
                                    <xforms:repeat
                                        nodeset="instance('lorem')/line[string-length(.) > 100]">
                                        <xhtml:tr>
                                            <xhtml:td>
                                                <xforms:output value="."/>
                                            </xhtml:td>
                                        </xhtml:tr>
                                    </xforms:repeat>
                                </xhtml:tbody>
                            </fr:datatable>
                        </xforms:repeat>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314422">
                <fr:label>#314422: Datatable: go to the last page when the current page
                    disappears</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314422&amp;group_id=168&amp;atid=350207"
                            >314422</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('detailed-lorem')">
                        <fr:datatable id="_314422-table" debug="false" paginated="true"
                            rowsPerPage="5">
                            <xhtml:thead>
                                <xhtml:tr>
                                    <xhtml:th>Position</xhtml:th>
                                    <xhtml:th>Text</xhtml:th>
                                </xhtml:tr>
                            </xhtml:thead>
                            <xhtml:tbody>
                                <xforms:repeat
                                    nodeset="line[length &lt; xxforms:instance('controls')/maxLength cast as xs:integer]">
                                    <xhtml:tr>
                                        <xhtml:td>
                                            <xforms:output value="position"/>
                                        </xhtml:td>
                                        <xhtml:td>
                                            <xforms:output value="text"/>
                                        </xhtml:td>
                                    </xhtml:tr>
                                </xforms:repeat>
                            </xhtml:tbody>
                        </fr:datatable>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314359">
                <fr:label>#314359: Scrollable datatables get their header and body columns
                    desynchronized in Firefox</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314359&amp;group_id=168&amp;atid=350207"
                            >314359</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314359" scrollable="horizontal" width="500px">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A loooooooong header</xhtml:th>
                                <xhtml:th>A header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) > 100]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314292">
                <fr:label>#314292: Datatable is not properly rendered. It looks like it's slightly
                    shifted to the left in IE6/7</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314292&amp;group_id=168&amp;atid=350207"
                            >314292</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314292">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A header</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314217">
                <fr:label>#314217: empty horizontally scrollable datatables do not display a
                    scrollbar in Firefox</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314217&amp;group_id=168&amp;atid=350207"
                            >314217</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314217" scrollable="horizontal" width="150px">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A header</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[false()]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="widths">
                <fr:label>Check column and table widths</fr:label>
                <xhtml:div>
                    <xhtml:p>This table is used to check that column and table widths are
                        consistent</xhtml:p>
                    <fr:datatable id="table-widths">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Number</xhtml:th>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="widths-resizeable">
                <fr:label>Check column and table widths with resizeabled columns</fr:label>
                <xhtml:div>
                    <xhtml:p>This table is used to check that column and table widths are
                        consistent</xhtml:p>
                    <fr:datatable id="table-widths-resizeable">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true" id="th-wr1">Number</xhtml:th>
                                <xhtml:th fr:resizeable="true" id="th-wr2">Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314216">
                <fr:label>#314216: reduce the width of the right column</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314216&amp;group_id=168&amp;atid=350207"
                            >314216</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314216">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true">Number</xhtml:th>
                                <xhtml:th id="th-314216-2" fr:resizeable="true">Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314209">
                <fr:label>#314209: Hide/Show cycle</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314209&amp;group_id=168&amp;atid=350207"
                            >314209</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314209" scrollable="horizontal" width="100%">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314211">
                <fr:label>#314211: Most simple datatable</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314211&amp;group_id=168&amp;atid=350207"
                            >314211</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314211">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314174">
                <fr:label>#314174: External pagination</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314174&amp;group_id=168&amp;atid=350207"
                            >314174</xhtml:a>.</xhtml:p>
                    <xhtml:p>The pagination isn't supposed to work, the purpose of this test is just
                        to display the table.</xhtml:p>
                    <fr:datatable id="table-314174" paginated="true"
                        sortAndPaginationMode="external" nbPages="5" page="2">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314210">
                <fr:label>#314210: 100% width, horizontal scroll, short lines</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314210&amp;group_id=168&amp;atid=350207"
                            >314210</xhtml:a>.</xhtml:p>
                    <fr:datatable width="100%" scrollable="horizontal" id="table-314210">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Number</xhtml:th>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>

        </fr:accordion>

    </xhtml:body>
</xhtml:html>
<commit_msg>[ #314459 ] Paginated datatables: the page number is not properly set when the datatable is hidden (by an empty context) and show again (fix and repro case).<commit_after><!--
  Copyright (C) 2009 Orbeon, Inc.

  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU Lesser General Public License as published by the Free Software Foundation; either version
  2.1 of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
  -->
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:widget="http://orbeon.org/oxf/xml/widget"
    xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:xi="http://www.w3.org/2001/XInclude">

    <xhtml:head>
        <xhtml:title>Datatable</xhtml:title>

        <xi:include href="datatable-unittest-model.xml"/>

        <xhtml:link type="text/css" rel="stylesheet" href="/ops/yui/logger/assets/logger.css"/>
        <xhtml:script type="text/javascript" src="/ops/yui/logger/logger.js"/>
        <xhtml:script type="text/javascript" src="/ops/yui/yuitest/yuitest.js"/>
        <xhtml:script type="text/javascript" src="/xbl/orbeon/datatable/datatable-unittest.js"/>
        <xhtml:script type="text/javascript" src="/xbl/orbeon/datatable/datatable-unittest-lib.js"/>

    </xhtml:head>
    <xhtml:body>

        <xhtml:fieldset>
            <xhtml:legend>Datatable test events</xhtml:legend>
            <xhtml:p>
                <xforms:group ref="instance('controls')">
                    <xforms:input ref="maxLength" id="maxLength">
                        <xforms:label>Maximum length: </xforms:label>
                        <xforms:help>Used by tests that check instance updates.</xforms:help>
                    </xforms:input>
                </xforms:group>
            </xhtml:p>
            <xhtml:p>
                <xforms:group ref="instance('controls')">
                    <xforms:input ref="show" id="show">
                        <xforms:label>Show: </xforms:label>
                        <xforms:help>Used by tests that hide/show cycles.</xforms:help>
                    </xforms:input>
                </xforms:group>
            </xhtml:p>
            <xhtml:ol>
                <xhtml:li>
                    <xforms:trigger appearance="minimal" id="open-all">
                        <xforms:label>Open all</xforms:label>
                        <xforms:dispatch ev:event="DOMActivate" target="my-accordion"
                            name="fr-accordion-toggle-all">
                            <xxforms:context name="selected" select="true()"/>
                        </xforms:dispatch>
                    </xforms:trigger>
                </xhtml:li>
                <xhtml:li>
                    <xforms:trigger appearance="minimal" id="close-all">
                        <xforms:label>Close all</xforms:label>
                        <xforms:dispatch ev:event="DOMActivate" target="my-accordion"
                            name="fr-accordion-toggle-all">
                            <xxforms:context name="selected" select="false()"/>
                        </xforms:dispatch>
                    </xforms:trigger>
                </xhtml:li>
            </xhtml:ol>
        </xhtml:fieldset>

        <fr:accordion class="fr-accordion-lnf" id="my-accordion">
            <!-- <fr:case selected="true" id="_new">
                <fr:label>#new: style attributes are not properly copied</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314292&amp;group_id=168&amp;atid=350207"
                            >314292</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-new">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true">A header (that shouldn't display)</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <span style="display:none">
                                            <xforms:output value="position()"/>
                                        </span>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>-->
            <fr:case selected="true" id="_314459">
                <fr:label>#314459:Paginated datatables: the page number is not properly set when the
                    datatable is hidden (by an empty context) and show again.</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314459&amp;group_id=168&amp;atid=350207"
                            >314459</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('lorem')[instance('controls')/show = 'true']">
                        <fr:datatable id="_314459-table" paginated="true" rowsPerPage="5">
                            <xhtml:thead>
                                <xhtml:tr>
                                    <xhtml:th>Text</xhtml:th>
                                </xhtml:tr>
                            </xhtml:thead>
                            <xhtml:tbody>
                                <xforms:repeat
                                    nodeset="line[string-length() &lt; xxforms:instance('controls')/maxLength cast as xs:integer]">
                                    <xhtml:tr>
                                        <xhtml:td>
                                            <xforms:output value="."/>
                                        </xhtml:td>
                                    </xhtml:tr>
                                </xforms:repeat>
                            </xhtml:tbody>
                        </fr:datatable>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314415">
                <fr:label>#314415:Datatable within an xforms:repeat are not properly initialized
                    when iterations are deleted and added again</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314415&amp;group_id=168&amp;atid=350207"
                            >314415</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('lorem')[instance('controls')/show = 'true']">
                        <xforms:repeat nodeset="line[position() = (1, 2)]">
                            <fr:datatable id="_314415-table" scrollable="both" width="500px"
                                height="200px">
                                <xhtml:thead>
                                    <xhtml:tr>
                                        <xhtml:th>Text</xhtml:th>
                                    </xhtml:tr>
                                </xhtml:thead>
                                <xhtml:tbody>
                                    <xforms:repeat
                                        nodeset="instance('lorem')/line[string-length(.) > 100]">
                                        <xhtml:tr>
                                            <xhtml:td>
                                                <xforms:output value="."/>
                                            </xhtml:td>
                                        </xhtml:tr>
                                    </xforms:repeat>
                                </xhtml:tbody>
                            </fr:datatable>
                        </xforms:repeat>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314422">
                <fr:label>#314422: Datatable: go to the last page when the current page
                    disappears</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314422&amp;group_id=168&amp;atid=350207"
                            >314422</xhtml:a>.</xhtml:p>
                    <xforms:group ref="instance('detailed-lorem')">
                        <fr:datatable id="_314422-table" debug="false" paginated="true"
                            rowsPerPage="5">
                            <xhtml:thead>
                                <xhtml:tr>
                                    <xhtml:th>Position</xhtml:th>
                                    <xhtml:th>Text</xhtml:th>
                                </xhtml:tr>
                            </xhtml:thead>
                            <xhtml:tbody>
                                <xforms:repeat
                                    nodeset="line[length &lt; xxforms:instance('controls')/maxLength cast as xs:integer]">
                                    <xhtml:tr>
                                        <xhtml:td>
                                            <xforms:output value="position"/>
                                        </xhtml:td>
                                        <xhtml:td>
                                            <xforms:output value="text"/>
                                        </xhtml:td>
                                    </xhtml:tr>
                                </xforms:repeat>
                            </xhtml:tbody>
                        </fr:datatable>
                    </xforms:group>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314359">
                <fr:label>#314359: Scrollable datatables get their header and body columns
                    desynchronized in Firefox</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="http://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314359&amp;group_id=168&amp;atid=350207"
                            >314359</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314359" scrollable="horizontal" width="500px">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A loooooooong header</xhtml:th>
                                <xhtml:th>A header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) > 100]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314292">
                <fr:label>#314292: Datatable is not properly rendered. It looks like it's slightly
                    shifted to the left in IE6/7</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314292&amp;group_id=168&amp;atid=350207"
                            >314292</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314292">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A header</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314217">
                <fr:label>#314217: empty horizontally scrollable datatables do not display a
                    scrollbar in Firefox</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314217&amp;group_id=168&amp;atid=350207"
                            >314217</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314217" scrollable="horizontal" width="150px">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>A header</xhtml:th>
                                <xhtml:th>A loooooooong header</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[false()]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="widths">
                <fr:label>Check column and table widths</fr:label>
                <xhtml:div>
                    <xhtml:p>This table is used to check that column and table widths are
                        consistent</xhtml:p>
                    <fr:datatable id="table-widths">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Number</xhtml:th>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="widths-resizeable">
                <fr:label>Check column and table widths with resizeabled columns</fr:label>
                <xhtml:div>
                    <xhtml:p>This table is used to check that column and table widths are
                        consistent</xhtml:p>
                    <fr:datatable id="table-widths-resizeable">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true" id="th-wr1">Number</xhtml:th>
                                <xhtml:th fr:resizeable="true" id="th-wr2">Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314216">
                <fr:label>#314216: reduce the width of the right column</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314216&amp;group_id=168&amp;atid=350207"
                            >314216</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314216">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th fr:resizeable="true">Number</xhtml:th>
                                <xhtml:th id="th-314216-2" fr:resizeable="true">Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314209">
                <fr:label>#314209: Hide/Show cycle</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314209&amp;group_id=168&amp;atid=350207"
                            >314209</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314209" scrollable="horizontal" width="100%">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314211">
                <fr:label>#314211: Most simple datatable</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314211&amp;group_id=168&amp;atid=350207"
                            >314211</xhtml:a>.</xhtml:p>
                    <fr:datatable id="table-314211">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314174">
                <fr:label>#314174: External pagination</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314174&amp;group_id=168&amp;atid=350207"
                            >314174</xhtml:a>.</xhtml:p>
                    <xhtml:p>The pagination isn't supposed to work, the purpose of this test is just
                        to display the table.</xhtml:p>
                    <fr:datatable id="table-314174" paginated="true"
                        sortAndPaginationMode="external" nbPages="5" page="2">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>
            <fr:case selected="true" id="_314210">
                <fr:label>#314210: 100% width, horizontal scroll, short lines</fr:label>
                <xhtml:div>
                    <xhtml:p>Bug <xhtml:a
                            href="https://forge.ow2.org/tracker/index.php?func=detail&amp;aid=314210&amp;group_id=168&amp;atid=350207"
                            >314210</xhtml:a>.</xhtml:p>
                    <fr:datatable width="100%" scrollable="horizontal" id="table-314210">
                        <xhtml:thead>
                            <xhtml:tr>
                                <xhtml:th>Number</xhtml:th>
                                <xhtml:th>Text</xhtml:th>
                            </xhtml:tr>
                        </xhtml:thead>
                        <xhtml:tbody>
                            <xforms:repeat nodeset="line[string-length(.) &lt; 20]">
                                <xhtml:tr>
                                    <xhtml:td>
                                        <xforms:output value="position()"/>
                                    </xhtml:td>
                                    <xhtml:td>
                                        <xforms:output value="."/>
                                    </xhtml:td>
                                </xhtml:tr>
                            </xforms:repeat>
                        </xhtml:tbody>
                    </fr:datatable>
                </xhtml:div>
            </fr:case>

        </fr:accordion>

    </xhtml:body>
</xhtml:html>

{'fraction_non_alphanumeric': 0.11735338227168679, 'fraction_numerical': 0.022022259057542033, 'mean_word_length': 0.9382314694408322, 'pattern_counts': {'":': 0, '<': 1003, '<?xml version=': 0, '>': 1007, 'https://': 16, 'lorem ipsum': 0, 'www.': 12, 'xml': 33}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 190, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7590739', 'n_tokens_mistral': 14080, 'n_tokens_neox': 11987, 'n_words': 1897}