Skip to content

Commit

Permalink
Copy following siblings of the $block and re-insert them after the …
Browse files Browse the repository at this point in the history
…`$row-form`
  • Loading branch information
namedgraph committed Nov 15, 2024
1 parent 27b5278 commit ee449f5
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,23 @@ exclude-result-prefixes="#all"
<xsl:with-param name="show-cancel-button" select="false()"/>
</xsl:apply-templates>
</xsl:variable>

<!-- <xsl:variable name="content-body" select="id('content-body', ixsl:page())" as="element()"/>

<!-- copy following block siblings -->
<xsl:variable name="following-siblings" select="$block/following-sibling::*" as="element()*"/>
<!-- remove following block siblings -->
<xsl:for-each select="$following-siblings">
<xsl:sequence select="ixsl:call(., 'remove', [])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>

<xsl:variable name="content-body" select="id('content-body', ixsl:page())" as="element()"/>
<!-- TO-DO: replace with <xsl:result-document href="?." method="ixsl:insert-after"> when SaxonJS 3 is available https://saxonica.plan.io/issues/5543 -->
<xsl:for-each select="$content-body">
<xsl:result-document href="?." method="ixsl:append-content">
<xsl:sequence select="$row-form"/>
<!-- re-insert following siblings -->
<xsl:sequence select="$following-siblings"/>
</xsl:result-document>
</xsl:for-each>-->
<!-- insert $row-form after the $block TO-DO: replace with <xsl:result-document href="?." method="ixsl:insert-after"> when SaxonJS 3 is available https://saxonica.plan.io/issues/5543 -->
<xsl:sequence select="ixsl:call($block, 'after', [ $row-form ])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>
</xsl:template>

<!-- disable inline editing form (do nothing if the button is disabled) -->
Expand Down

0 comments on commit ee449f5

Please sign in to comment.