Skip to content

Commit d3af7c3

Browse files
committed
Make $object-metadata optional
1 parent d8b127c commit d3af7c3

File tree

1 file changed

+2
-2
lines changed
  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client

1 file changed

+2
-2
lines changed

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ WHERE
380380
<xsl:variable name="object-uris" select="distinct-values($resource/*/@rdf:resource[not(key('resources', .))])" as="xs:string*"/>
381381
<xsl:variable name="query-string" select="$object-metadata-query || ' VALUES $this { ' || string-join(for $uri in $object-uris return '&lt;' || $uri || '&gt;', ' ') || ' }'" as="xs:string"/>
382382
<xsl:variable name="request-uri" select="ac:build-uri(resolve-uri('sparql', $ldt:base), map{ 'query': $query-string, 'accept': 'application/rdf+xml' })" as="xs:anyURI"/>
383-
<xsl:variable name="object-metadata" select="document($request-uri)" as="document-node()"/>
383+
<xsl:variable name="object-metadata" select="if (doc-available($request-uri)) then document($request-uri) else ()" as="document-node()?"/>
384384
<xsl:message>
385385
$object-uris: <xsl:value-of select="$object-uris"/>
386386
$object-metadata: <xsl:value-of select="serialize($object-metadata)"/>
@@ -797,7 +797,7 @@ WHERE
797797
<xsl:variable name="object-uris" select="distinct-values($resource/*/@rdf:resource[not(key('resources', .))])" as="xs:string*"/>
798798
<xsl:variable name="query-string" select="$object-metadata-query || ' VALUES $this { ' || string-join(for $uri in $object-uris return '&lt;' || $uri || '&gt;', ' ') || ' }'" as="xs:string"/>
799799
<xsl:variable name="request-uri" select="ac:build-uri(resolve-uri('sparql', $ldt:base), map{ 'query': $query-string, 'accept': 'application/rdf+xml' })" as="xs:anyURI"/>
800-
<xsl:variable name="object-metadata" select="document($request-uri)" as="document-node()"/>
800+
<xsl:variable name="object-metadata" select="if (doc-available($request-uri)) then document($request-uri) else ()" as="document-node()?"/>
801801
<xsl:message>
802802
$object-uris: <xsl:value-of select="$object-uris"/>
803803
$object-metadata: <xsl:value-of select="serialize($object-metadata)"/>

0 commit comments

Comments
 (0)