[xsl] Counting following siblings for table spans

Subject: [xsl] Counting following siblings for table spans
From: "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Jan 2026 18:33:55 -0000
Hi All,



I have table data like this:



<?xml version="1.0" encoding="UTF-8"?>
<tbl>
    <row>
        <cell-1>Throughout</cell-1>
        <cell-2>log book</cell-2>
        <cell-3>logbook</cell-3>
    </row>
    <row>
        <cell-2>AirVault</cell-2>
        <cell-3>Aircraft Records Database</cell-3>
    </row>
    <row>
        <cell-2>411</cell-2>
        <cell-3>aircraft data management</cell-3>
    </row>
    <row>
        <cell-2>Status Report</cell-2>
        <cell-3>MDR</cell-3>
    </row>
    <row>
        <cell-2>Removed M-Facility Directors (MFD)</cell-2>
    </row>
    <row>
        <cell-1>1 / 1-2</cell-1>
        <cell-2>All revisions will be submitted to the FAA for
review.</cell-2>
        <cell-3>All revisions of this manual will be submitted to the FAA
for review.</cell-3>
    </row>
</tbl>



When I encounter a <cell-1> element, I need to count the immediately
following ../row elements that don't have a <cell-1> child so I can
determine the row span value. In my example, the <cell-1> element would span
the following 4 rows because they don't have <cell-1> elements. I am trying
to figure out a good algorithm for doing this. Thank you.



Rick

Current Thread