@@ -496,8 +496,19 @@ exclude-result-prefixes="#all"
496496 </rdf : RDF >
497497 </xsl : document >
498498 </xsl : variable >
499-
500499 <xsl : variable name =" doc-uri" select =" ac:absolute-path(ldh:base-uri(.))" as =" xs:anyURI" />
500+ <xsl : variable name =" id" select =" 'id' || ac:uuid()" as =" xs:string" />
501+ <xsl : variable name =" this" select =" xs:anyURI($doc-uri || '#' || $id)" as =" xs:anyURI" />
502+ <!-- set document URI instead of blank node -->
503+ <xsl : variable name =" constructed-doc" as =" document-node()" >
504+ <xsl : document >
505+ <xsl : apply-templates select =" $constructed-doc" mode =" ldh:SetResourceID" >
506+ <xsl : with-param name =" forClass" select =" $forClass" tunnel =" yes" />
507+ <xsl : with-param name =" about" select =" $this" tunnel =" yes" />
508+ </xsl : apply-templates >
509+ </xsl : document >
510+ </xsl : variable >
511+
501512 <xsl : variable name =" method" select =" 'post'" as =" xs:string" />
502513 <xsl : variable name =" resource" select =" key('resources-by-type', $forClass, $constructed-doc)[not(key('predicates-by-object', @rdf:nodeID))]" as =" element()" />
503514 <xsl : variable name =" row-form" as =" element()*" >
@@ -516,10 +527,6 @@ exclude-result-prefixes="#all"
516527 <xsl : variable name =" request-uri" select =" ac:build-uri(resolve-uri('ns', $ldt:base), map{ 'query': $query-string, 'accept': 'application/sparql-results+xml' })" as =" xs:anyURI" />
517528 <xsl : variable name =" constructors" select =" if (exists($types)) then document($request-uri) else ()" as =" document-node()?" />
518529
519- <xsl : message >
520- .add-constructor $constructors: <xsl : value-of select =" serialize($constructors)" />
521- </xsl : message >
522-
523530 <xsl : variable name =" query-string" select =" $constraint-query || ' VALUES $Type { ' || string-join(for $type in $types return '< ' || $type || '> ', ' ') || ' }'" as =" xs:string" />
524531 <xsl : variable name =" request-uri" select =" ac:build-uri(resolve-uri('ns', $ldt:base), map{ 'query': $query-string, 'accept': 'application/sparql-results+xml' })" as =" xs:anyURI" />
525532 <xsl : variable name =" constraints" select =" if (exists($types)) then document($request-uri) else ()" as =" document-node()?" />
0 commit comments