Skip to content

Commit

Permalink
Restored $container expressions, decoupled $about from them
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Sep 6, 2024
1 parent eb3aef2 commit fdab731
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ exclude-result-prefixes="#all"
<xsl:template match="div[contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]//button[contains-token(@class, 'btn-save-query')]" mode="ixsl:onclick">
<ixsl:set-style name="cursor" select="'progress'" object="ixsl:page()//body"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]" as="element()"/>
<xsl:variable name="about" select="$container/@about" as="xs:anyURI"/>
<xsl:variable name="about" select="ancestor::div[@about][1]/@about" as="xs:anyURI"/>
<xsl:variable name="textarea" select="ancestor::form/descendant::textarea[@name = 'query']" as="element()"/>
<xsl:variable name="yasqe" select="ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.yasqe'), $textarea/ixsl:get(., 'id'))"/>
<xsl:variable name="query-string" select="ixsl:call($yasqe, 'getValue', [])" as="xs:string?"/> <!-- get query string from YASQE -->
Expand Down Expand Up @@ -485,7 +485,7 @@ exclude-result-prefixes="#all"

<xsl:template match="div[@about][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]//button[contains-token(@class, 'btn-save-chart')]" mode="ixsl:onclick">
<ixsl:set-style name="cursor" select="'progress'" object="ixsl:page()//body"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'content')]" as="element()"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'row-fluid')]" as="element()"/>
<xsl:variable name="textarea-id" select="$container//textarea[@name = 'query']/ixsl:get(., 'id')" as="xs:string"/>
<xsl:variable name="yasqe" select="ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.yasqe'), $textarea-id)"/>
<xsl:variable name="query-string" select="ixsl:call($yasqe, 'getValue', [])" as="xs:string"/> <!-- get query string from YASQE -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ WHERE
<xsl:template match="div[contains-token(@class, 'row-fluid')]//button[contains-token(@class, 'btn-edit')][not(contains-token(@class, 'disabled'))]" mode="ixsl:onclick">
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'row-fluid')][1]" as="element()"/>
<xsl:variable name="about" select="$container/@about" as="xs:anyURI"/>
<xsl:variable name="about" select="ancestor::div[@about][1]/@about" as="xs:anyURI"/>
<xsl:variable name="graph" as="xs:anyURI?"/>

<ixsl:set-style name="cursor" select="'progress'" object="ixsl:page()//body"/>
Expand Down Expand Up @@ -416,7 +416,7 @@ WHERE
<xsl:template match="div[@about][@typeof = ('&ldh;ResultSetChart', '&ldh;GraphChart')]//button[contains-token(@class, 'btn-cancel')][not(contains-token(@class, 'disabled'))]" mode="ixsl:onclick" priority="1">
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'row-fluid')][1]" as="element()"/>
<xsl:variable name="content-uri" select="xs:anyURI($container/@about)" as="xs:anyURI"/>
<!-- <xsl:variable name="content-uri" select="xs:anyURI($container/@about)" as="xs:anyURI"/>-->
<xsl:variable name="content-id" select="ixsl:get($container, 'id')" as="xs:string"/>
<xsl:variable name="about" select="$container/@about" as="xs:anyURI"/>

Expand Down Expand Up @@ -445,7 +445,7 @@ WHERE
<xsl:template match="div[@about][@typeof]//button[contains-token(@class, 'btn-cancel')][not(contains-token(@class, 'disabled'))]" mode="ixsl:onclick">
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'row-fluid')][1]" as="element()"/>
<xsl:variable name="about" select="$container/@about" as="xs:anyURI"/>
<xsl:variable name="about" select="ancestor::div[@about][1]/@about" as="xs:anyURI"/>

<ixsl:set-style name="cursor" select="'progress'" object="ixsl:page()//body"/>

Expand Down Expand Up @@ -1312,7 +1312,7 @@ WHERE
<!-- remove the whole div.row-fluid containing the form -->
<xsl:template match="div[contains-token(@class, 'row-fluid')]//button[contains-token(@class, 'btn-remove-resource')]" mode="ixsl:onclick" priority="2">
<xsl:variable name="container" select="ancestor::div[contains-token(@class, 'row-fluid')][1]" as="element()"/>
<xsl:variable name="about" select="$container/@about" as="xs:anyURI?"/>
<xsl:variable name="about" select="ancestor::div[@about][1]/@about" as="xs:anyURI"/>
<xsl:variable name="form" select="ancestor::form" as="element()"/>
<xsl:variable name="action" select="ixsl:get($form, 'action')" as="xs:anyURI"/>
<xsl:message>ldh:base-uri(.): <xsl:value-of select="ldh:base-uri(.)"/></xsl:message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ exclude-result-prefixes="#all"
<xsl:param name="active-mode" as="xs:anyURI"/>
<xsl:param name="refresh-content" as="xs:boolean?"/>

<!-- <ixsl:set-property name="dataset.contentMode" select="$active-mode" object="$container"/>-->

<xsl:for-each select="$container//div[@class = 'bar']">
<ixsl:set-style name="width" select="'75%'" object="."/>
</xsl:for-each>
Expand Down

0 comments on commit fdab731

Please sign in to comment.