Skip to content

Commit

Permalink
Restored ldh:LoadBlock named template
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Aug 13, 2024
1 parent 6f703f7 commit 0daf802
Showing 1 changed file with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1011,11 +1011,30 @@ exclude-result-prefixes="#all"

<!-- load content -->

<!-- TO-DO: move to respective stylesheets and call the named ldh:LoadBlock template -->
<!-- TO-DO: move to respective stylesheets -->
<xsl:template match="*[@about][@typeof = ('&ldh;View;, '&ldh;Object', '&ldh;ResultSetChart', '&ldh;GraphChart')]" mode="ldh:LoadBlock" priority="1">
<xsl:param name="acl-modes" as="xs:anyURI*"/>
<xsl:param name="doc" as="document-node()"/>
<xsl:param name="refresh-content" as="xs:boolean?"/>

<xsl:apply-templates select="." mode="ldh:LoadBlock">
<xsl:with-param name="acl-modes" select="$acl-modes"/>
<xsl:with-param name="doc" select="$results"/>
<xsl:with-param name="refresh-content" select="$refresh-content"/>
</xsl:apply-templates>
</xsl:template>

<xsl:template match="*[@about][@typeof]" mode="ldh:LoadBlock" >
<xsl:call-template name="ldh:BlockRendered">
<xsl:with-param name="container" select="."/>
</xsl:call-template>
</xsl:template>

<xsl:template name="ldh:LoadBlock">
<xsl:context-item as="element()" use="required"/> <!-- container element -->
<xsl:param name="acl-modes" as="xs:anyURI*"/>
<xsl:param name="doc" as="document-node()"/>
<xsl:param name="refresh-content" as="xs:boolean?"/>

<xsl:variable name="this" select="ancestor::div[@about][1]/@about" as="xs:anyURI"/>
<xsl:variable name="content-uri" select="(@about, $this)[1]" as="xs:anyURI"/> <!-- fallback to @about for charts, queries etc. -->
Expand Down Expand Up @@ -1067,12 +1086,6 @@ exclude-result-prefixes="#all"
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="*[@about][@typeof]" mode="ldh:LoadBlock" >
<xsl:call-template name="ldh:BlockRendered">
<xsl:with-param name="container" select="."/>
</xsl:call-template>
</xsl:template>

<!-- embed content -->

Expand Down

0 comments on commit 0daf802

Please sign in to comment.