@@ -343,7 +343,8 @@ LIMIT 10
343343 <xsl : param name =" id" select =" 'request-access'" as =" xs:string?" />
344344 <xsl : param name =" button-class" select =" 'btn btn-primary btn-access-form'" as =" xs:string?" />
345345 <xsl : param name =" accept-charset" select =" 'UTF-8'" as =" xs:string?" />
346- <xsl : param name =" action" select =" resolve-uri('access/request', ldt:base())" as =" xs:anyURI" />
346+ <xsl : param name =" this" as =" xs:anyURI" />
347+ <xsl : param name =" action" select =" ldh:href(resolve-uri('access/request', ldh:origin($this)))" as =" xs:anyURI" />
347348 <xsl : param name =" legend-label" select =" ac:label(key('resources', 'request-access', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri))))" as =" xs:string" />
348349 <xsl : param name =" agent" as =" xs:anyURI" />
349350
@@ -413,6 +414,7 @@ LIMIT 10
413414 <!-- TO-DO: support agent-group? -->
414415 <xsl : param name =" this" as =" xs:anyURI" />
415416 <xsl : param name =" access-modes" select =" (xs:anyURI('&acl; Read'), xs:anyURI('&acl; Append'), xs:anyURI('&acl; Write'))" as =" xs:anyURI*" />
417+ <xsl : param name =" base" select =" ldh:origin($this)" as =" xs:anyURI" />
416418
417419 <fieldset >
418420 <legend >URL-based access</legend >
@@ -448,7 +450,7 @@ LIMIT 10
448450 <!-- append an authorization for the current URL unless such already exists (e.g. lacl:OwnerAuthorization) -->
449451 <xsl : variable name =" has-access-to-this-auth" select =" exists(rdf:Description[acl:accessTo/@rdf:resource = $this])" as =" xs:boolean" />
450452 <xsl : for-each-group select =" if ($has-access-to-this-auth) then rdf:Description[acl:accessTo/@rdf:resource] else ($this-auth, rdf:Description[acl:accessTo/@rdf:resource])"
451- group-by =" acl:accessTo/@rdf:resource[starts-with(., ldt: base() )]" >
453+ group-by =" acl:accessTo/@rdf:resource[starts-with(., $ base)]" >
452454 <xsl : variable name =" granted-access-modes" select =" distinct-values(current-group()/acl:mode/@rdf:resource)" as =" xs:anyURI*" />
453455
454456 <!-- applying on the first authorization in the group -->
@@ -712,7 +714,7 @@ LIMIT 10
712714 <xsl : template match =" button[contains-token(@class, 'btn-access-form')]" mode =" ixsl:onclick" >
713715 <!-- TO-DO: fix for admin apps -->
714716 <xsl : param name =" this" select =" ac:absolute-path(ldh:base-uri(.))" as =" xs:anyURI" />
715- <xsl : variable name =" request-uri" select =" ldh:href(ac:build-uri(resolve-uri('access', ldt:base( )), map{ 'this': $this }))" as =" xs:anyURI" />
717+ <xsl : variable name =" request-uri" select =" ldh:href(ac:build-uri(resolve-uri('access', ldh:origin($this )), map{ 'this': $this }))" as =" xs:anyURI" />
716718 <xsl : variable name =" request" as =" item()*" >
717719 <ixsl : schedule-action http-request =" map{ 'method': 'GET', 'href': $request-uri, 'headers': map{ 'Accept': 'application/rdf+xml' } }" >
718720 <xsl : call-template name =" onAccessResponseLoad" >
@@ -1198,6 +1200,7 @@ LIMIT 10
11981200 <xsl : call-template name =" ldh:ShowModalForm" >
11991201 <xsl : with-param name =" form" as =" element()" >
12001202 <xsl : apply-templates select =" $body" mode =" ldh:RequestAccessForm" >
1203+ <xsl : with-param name =" this" select =" $this" />
12011204 <xsl : with-param name =" agent" select =" $agent" />
12021205 </xsl : apply-templates >
12031206 </xsl : with-param >
0 commit comments