Skip to content

Commit e96d4d3

Browse files
committed
Server-side condition
1 parent e445a3c commit e96d4d3

File tree

1 file changed

+30
-22
lines changed
  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2

1 file changed

+30
-22
lines changed

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -918,30 +918,38 @@ exclude-result-prefixes="#all">
918918
<xsl:sort select="ac:label(.)"/>
919919
</xsl:apply-templates>
920920
</xsl:when>
921-
<xsl:when test="$ac:mode = '&ldh;ContentMode'">
922-
<xsl:apply-templates select="." mode="ldh:ContentList"/>
923-
</xsl:when>
924-
<xsl:when test="$ac:mode = '&ac;MapMode'">
925-
<xsl:apply-templates select="." mode="bs2:Map">
926-
<xsl:with-param name="id" select="generate-id() || '-map-canvas'"/>
927-
<xsl:sort select="ac:label(.)"/>
928-
</xsl:apply-templates>
929-
</xsl:when>
930-
<xsl:when test="$ac:mode = '&ac;ChartMode'">
931-
<xsl:apply-templates select="." mode="bs2:Chart">
932-
<xsl:with-param name="canvas-id" select="generate-id() || '-chart-canvas'"/>
933-
<xsl:with-param name="show-save" select="false()"/>
934-
<xsl:sort select="ac:label(.)"/>
935-
</xsl:apply-templates>
936-
</xsl:when>
937-
<xsl:when test="$ac:mode = '&ac;GraphMode'">
938-
<xsl:variable name="canvas-id" select="generate-id() || '-graph-canvas'" as="xs:string"/>
939-
<div id="{$canvas-id}" class="graph-3d-canvas"/>
921+
<!-- the request is proxied using ?uri, render it client-side in client.xsl -->
922+
<xsl:when test="not(ldh:base-uri(.) = $ldh:requestUri)">
923+
<!-- no output TO-DO: progress bar? -->
940924
</xsl:when>
941925
<xsl:otherwise>
942-
<xsl:apply-templates select="." mode="bs2:Row">
943-
<xsl:sort select="ac:label(.)"/>
944-
</xsl:apply-templates>
926+
<xsl:choose>
927+
<xsl:when test="$ac:mode = '&ldh;ContentMode'">
928+
<xsl:apply-templates select="." mode="ldh:ContentList"/>
929+
</xsl:when>
930+
<xsl:when test="$ac:mode = '&ac;MapMode'">
931+
<xsl:apply-templates select="." mode="bs2:Map">
932+
<xsl:with-param name="id" select="generate-id() || '-map-canvas'"/>
933+
<xsl:sort select="ac:label(.)"/>
934+
</xsl:apply-templates>
935+
</xsl:when>
936+
<xsl:when test="$ac:mode = '&ac;ChartMode'">
937+
<xsl:apply-templates select="." mode="bs2:Chart">
938+
<xsl:with-param name="canvas-id" select="generate-id() || '-chart-canvas'"/>
939+
<xsl:with-param name="show-save" select="false()"/>
940+
<xsl:sort select="ac:label(.)"/>
941+
</xsl:apply-templates>
942+
</xsl:when>
943+
<xsl:when test="$ac:mode = '&ac;GraphMode'">
944+
<xsl:variable name="canvas-id" select="generate-id() || '-graph-canvas'" as="xs:string"/>
945+
<div id="{$canvas-id}" class="graph-3d-canvas"/>
946+
</xsl:when>
947+
<xsl:otherwise>
948+
<xsl:apply-templates select="." mode="bs2:Row">
949+
<xsl:sort select="ac:label(.)"/>
950+
</xsl:apply-templates>
951+
</xsl:otherwise>
952+
</xsl:choose>
945953
</xsl:otherwise>
946954
</xsl:choose>
947955
</div>

0 commit comments

Comments
 (0)