Kaydet (Commit) 6f364298 authored tarafından David Tardon's avatar David Tardon

check only Row elements when computing row index

Change-Id: I3bd1b0749f8889cbd1d92a0edfa84d754e888f03
üst 30e2171b
...@@ -5255,15 +5255,15 @@ ...@@ -5255,15 +5255,15 @@
<xsl:choose> <xsl:choose>
<xsl:when test="@ss:Index"><xsl:value-of select="@ss:Index -1 + $simple-span-value"/></xsl:when> <xsl:when test="@ss:Index"><xsl:value-of select="@ss:Index -1 + $simple-span-value"/></xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:variable name="recent-index" select="preceding-sibling::*[@ss:Index][last()]"></xsl:variable> <xsl:variable name="recent-index" select="preceding-sibling::ss:Row[@ss:Index][last()]"></xsl:variable>
<xsl:choose> <xsl:choose>
<xsl:when test="$recent-index"> <xsl:when test="$recent-index">
<xsl:variable name="nodes-up-to-current" select="set:intersection(preceding-sibling::*, $recent-index/following-sibling::*)"></xsl:variable> <xsl:variable name="nodes-up-to-current" select="set:intersection(preceding-sibling::ss:Row, $recent-index/following-sibling::ss:Row)"></xsl:variable>
<xsl:variable name="allSpans" select="$nodes-up-to-current/@ss:Span"/> <xsl:variable name="allSpans" select="$nodes-up-to-current/@ss:Span"/>
<xsl:value-of select="$recent-index/@ss:Index + count($nodes-up-to-current) + sum($allSpans) + count($allSpans)"/> <xsl:value-of select="$recent-index/@ss:Index + count($nodes-up-to-current) + sum($allSpans) + count($allSpans)"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:variable name="allSpans" select="preceding-sibling::*/@ss:Span"/> <xsl:variable name="allSpans" select="preceding-sibling::ss:Row/@ss:Span"/>
<xsl:value-of select="position() + sum($allSpans) + count($allSpans)"/> <xsl:value-of select="position() + sum($allSpans) + count($allSpans)"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment