1111 <!ENTITY http " http://www.w3.org/2011/http#" >
1212 <!ENTITY ldt " https://www.w3.org/ns/ldt#" >
1313 <!ENTITY dh " https://www.w3.org/ns/ldt/document-hierarchy#" >
14+ <!ENTITY acl " http://www.w3.org/ns/auth/acl#" >
1415 <!ENTITY cert " http://www.w3.org/ns/auth/cert#" >
1516 <!ENTITY sd " http://www.w3.org/ns/sparql-service-description#" >
1617 <!ENTITY sh " http://www.w3.org/ns/shacl#" >
@@ -38,8 +39,10 @@ xmlns:rdfs="&rdfs;"
3839xmlns:dct=" &dct; "
3940xmlns:typeahead=" &typeahead; "
4041xmlns:ldt=" &ldt; "
42+ xmlns:acl=" &acl; "
4143xmlns:sd=" &sd; "
4244xmlns:sh=" &sh; "
45+ xmlns:sioc=" &sioc; "
4346xmlns:spin=" &spin; "
4447xmlns:bs2=" http://graphity.org/xsl/bootstrap/2.3.2"
4548extension-element-prefixes=" ixsl"
@@ -103,6 +106,19 @@ WHERE
103106 <!-- hide constraint violations and HTTP responses in the form - they are displayed as errors on the edited resources -->
104107 <xsl : template match =" *[rdf:type/@rdf:resource = ('&spin;ConstraintViolation', '&sh;ValidationResult', '&sh;ValidationReport', '&http;Response')]" mode =" bs2:Form" priority =" 3" />
105108
109+ <!-- hide the system properties of document resources (they are set automatically by LinkedDataHub) -->
110+ <xsl : template match =" *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/dct:created | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/dct:modified | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/sioc:has_container | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/sioc:has_parent | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/dct:creator | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/acl:owner | *[rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]/rdf:*[starts-with(local-name(), '_')]" mode =" bs2:FormControl" priority =" 1" >
111+ <xsl : apply-templates select =" ." mode =" xhtml:Input" >
112+ <xsl : with-param name =" type" select =" 'hidden'" />
113+ </xsl : apply-templates >
114+ <xsl : apply-templates select =" node() | @rdf:resource | @rdf:nodeID" mode =" xhtml:Input" >
115+ <xsl : with-param name =" type" select =" 'hidden'" />
116+ </xsl : apply-templates >
117+ <xsl : apply-templates select =" @xml:lang | @rdf:datatype" mode =" xhtml:Input" >
118+ <xsl : with-param name =" type" select =" 'hidden'" />
119+ </xsl : apply-templates >
120+ </xsl : template >
121+
106122 <!-- canonicalize XML in rdf:XMLLiterals -->
107123 <xsl : template match =" json:string[@key = 'object'][ends-with(., '^^&rdf;XMLLiteral')]" mode =" ldh:CanonicalizeXML" priority =" 1" >
108124 <xsl : copy >
@@ -189,7 +205,7 @@ WHERE
189205 <ixsl : set-attribute name =" type" select =" 'text'" />
190206
191207 <xsl : variable name =" timezone" select =" ixsl:get(following-sibling::input[contains-token(@class, 'input-timezone')], 'value')" as =" xs:string" />
192- <!-- TO-DO: handle invalid timezone values -->
208+ <!-- concatenate datetime-local value together with timezone TO-DO: handle invalid timezone values -->
193209 <xsl : variable name =" timezoned-value" select =" xs:dateTime(ixsl:get(., 'value') || $timezone)" as =" xs:dateTime" />
194210 <ixsl : set-property name =" value" select =" $timezoned-value" object =" ." />
195211 </xsl : template >
@@ -264,9 +280,9 @@ WHERE
264280 <xsl : sequence select =" ixsl:call(ixsl:event(), 'preventDefault', [])" />
265281 <ixsl : set-style name =" cursor" select =" 'progress'" object =" ixsl:page()//body" />
266282
267- <xsl : if test =" ixsl:contains(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || ac:absolute-path(ldh:base-uri(.)) || '`')" >
283+ <!-- <xsl:if test="ixsl:contains(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || ac:absolute-path(ldh:base-uri(.)) || '`')">
268284 <xsl:variable name="etag" select="ixsl:get(ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || ac:absolute-path(ldh:base-uri(.)) || '`'), 'etag')" as="xs:string"/>
269- </xsl : if >
285+ </xsl:if>-->
270286 <xsl : if test =" not(ixsl:contains(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $about || '`'))" >
271287 <ixsl : set-property name =" {'`' || $about || '`'}" select =" ldh:new-object()" object =" ixsl:get(ixsl:window(), 'LinkedDataHub.contents')" />
272288 </xsl : if >
@@ -275,11 +291,10 @@ WHERE
275291
276292 <!-- if the URI is external, dereference it through the proxy -->
277293 <xsl : variable name =" request-uri" select =" ldh:href($ldt:base, ac:absolute-path(ldh:base-uri(.)), map{}, ac:absolute-path(ldh:base-uri(.)), $graph, ())" as =" xs:anyURI" />
278-
279294 <xsl : variable name =" request" as =" item()*" >
280295 <!-- If-Match header checks preconditions, i.e. that the graph has not been modified in the meanwhile -->
281296 <ixsl : schedule-action http-request =" map{ 'method': 'GET', 'href': $request-uri, 'headers': map{ 'Accept': 'application/rdf+xml' } }" >
282- <xsl : call-template name =" ldh:LoadEditedDocument " >
297+ <xsl : call-template name =" ldh:LoadEditedResource " >
283298 <xsl : with-param name =" block" select =" $block" />
284299 <xsl : with-param name =" about" select =" $about" />
285300 </xsl : call-template >
@@ -288,7 +303,7 @@ WHERE
288303 <xsl : sequence select =" $request[current-date() lt xs:date('2000-01-01')]" />
289304 </xsl : template >
290305
291- <xsl : template name =" ldh:LoadEditedDocument " >
306+ <xsl : template name =" ldh:LoadEditedResource " >
292307 <xsl : context-item as =" map(*)" use =" required" />
293308 <xsl : param name =" block" as =" element()" />
294309 <xsl : param name =" about" as =" xs:anyURI" />
0 commit comments