Skip to content

Commit 441ece5

Browse files
committed
Debug anchor onclick template match
1 parent e1534f6 commit 441ece5

File tree

1 file changed

+7
-1
lines changed
  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl

1 file changed

+7
-1
lines changed

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ WHERE
954954

955955
<!-- intercept all HTML and SVG link clicks except to /uploads/ and those in the navbar (except breadcrumb bar, .brand and app list) and the footer -->
956956
<!-- resolve URLs against the current document URL because they can be relative -->
957-
<xsl:template match="a[not(@target)][starts-with(resolve-uri(@href, ldh:base-uri(.)), 'http://') or starts-with(resolve-uri(@href, ldh:base-uri(.)), 'https://')][not(starts-with(resolve-uri(@href, ldh:base-uri(.)), resolve-uri('uploads/', $ldt:base)))][ancestor::div[@id = 'breadcrumb-nav'] or not(ancestor::div[tokenize(@class, ' ') = ('navbar', 'footer')])] | a[contains-token(@class, 'brand')] | div[button[contains-token(@class, 'btn-apps')]]/ul//a | svg:a[not(@target)][starts-with(resolve-uri(@href, ldh:base-uri(.)), 'http://') or starts-with(resolve-uri(@href, ldh:base-uri(.)), 'https://')][not(starts-with(resolve-uri(@href, ldh:base-uri(.)), resolve-uri('uploads/', $ldt:base)))]" mode="ixsl:onclick">
957+
<xsl:template match="a[not(@target)][starts-with(resolve-uri(@href, ldh:base-uri(.)), 'http://') or starts-with(resolve-uri(@href, ldh:base-uri(.)), 'https://')][not(starts-with(resolve-uri(@href, ldh:base-uri(.)), resolve-uri('uploads/', $ldt:base)))][ancestor::div[@id = 'breadcrumb-nav'] or not(ancestor::div[tokenize(@class, ' ') = ('navbar', 'footer')])] | a[contains-token(@class, 'brand')] | div[button[contains-token(@class, 'btn-apps')]]/ul//a | svg:a[not(@target)][starts-with(resolve-uri(@href, ldh:base-uri(.)), 'http://') or starts-with(resolve-uri(@href, ldh:base-uri(.)), 'https://')][not(starts-with(resolve-uri(@href, ldh:base-uri(.)), resolve-uri('uploads/', $ldt:base)))]" mode="ixsl:onclick" priority="1">
958958
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
959959
<xsl:variable name="href" select="resolve-uri(@href, ldh:base-uri(.))" as="xs:anyURI"/> <!-- resolve relative URIs -->
960960

@@ -978,6 +978,12 @@ WHERE
978978
<ixsl:set-property name="request" select="$request" object="ixsl:get(ixsl:window(), 'LinkedDataHub')"/>
979979
</xsl:template>
980980

981+
<xsl:template match="a[not(@target)][@href]" mode="ixsl:onclick">
982+
<xsl:message>WTF
983+
starts-with(resolve-uri(@href, ldh:base-uri(.)): <xsl:value-of select="starts-with(resolve-uri(@href, ldh:base-uri(.))"/>
984+
</xsl:message>
985+
</xsl:template>
986+
981987
<xsl:template match="form[contains-token(@class, 'navbar-form')]" mode="ixsl:onsubmit">
982988
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
983989
<xsl:variable name="uri-string" select=".//input[@name = 'uri']/ixsl:get(., 'value')" as="xs:string?"/>

0 commit comments

Comments
 (0)