Skip to content

Commit

Permalink
better count preceding w:trs
Browse files Browse the repository at this point in the history
  • Loading branch information
fr4nze committed Aug 1, 2023
1 parent 9d23ec0 commit 87ed1ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xsl/tables.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -599,15 +599,15 @@
<xsl:if test="w:tcPr/w:vMerge/@w:val = 'restart'">
<xsl:variable name="is-thead-tr" as="xs:boolean"
select="exists(parent::w:tr[docx2hub:is-tableheader-row(.,
index-of(ancestor::w:tbl[1]/*, .),
count(preceding-sibling::w:tr)+1,
ancestor::w:tbl[1]/w:tblPr/w:tblLook)])"/>
<xsl:variable name="next-non-vmerged-tr" as="element(w:tr)?"
select="../following-sibling::w:tr[not(docx2hub:is-blind-vmerged-row(.))][1]"/>
<xsl:variable name="counts" as="xs:integer*">
<xsl:choose>
<xsl:when test="$is-thead-tr = true()
and not(../following-sibling::w:tr[1][docx2hub:is-tableheader-row(.,
index-of(ancestor::w:tbl[1]/*, .),
count(preceding-sibling::w:tr)+1,
ancestor::w:tbl[1]/w:tblPr/w:tblLook)])">
<xsl:sequence select="999"/>
</xsl:when>
Expand Down

0 comments on commit 87ed1ef

Please sign in to comment.