Skip to content

Commit

Permalink
Openen van een document zonder pad/naam resulteert in een lege sequence
Browse files Browse the repository at this point in the history
Improvement; zeer uitzonderlijke situatie, opvangen.
  • Loading branch information
arjan authored and arjan committed Nov 28, 2024
1 parent e003ff3 commit c5d981c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/resources/xsl/common/Imvert-common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
Specify if it is assumed to exist; if false, test availability (which slows down)
-->
<xsl:function name="imf:document" as="document-node()?">
<xsl:param name="uri-or-path" as="xs:string"/>
<xsl:param name="uri-or-path" as="xs:string?"/>
<xsl:param name="assume-existing" as="xs:boolean"/>

<xsl:variable name="is-local-uri" select="matches($uri-or-path,'^file:.*$')"/>
Expand All @@ -865,6 +865,9 @@
else ()"/>

<xsl:choose>
<xsl:when test="empty($uri-or-path)">
<xsl:sequence select="()"/>
</xsl:when>
<xsl:when test="$assume-existing">
<xsl:sequence select="imf:document-from-cache($uri)"/>
</xsl:when>
Expand All @@ -881,7 +884,7 @@
</xsl:function>

<xsl:function name="imf:document-from-cache" as="document-node()">
<xsl:param name="uri"/>
<xsl:param name="uri" as="xs:string"/>
<xsl:sequence select="document($uri)"/>
</xsl:function>

Expand Down Expand Up @@ -944,12 +947,12 @@
</xsl:function>

<xsl:function name="imf:file-to-url">
<xsl:param name="filepath"/>
<xsl:param name="filepath" as="xs:string?"/>
<xsl:value-of select="imf:path-to-file-uri($filepath)"/>
</xsl:function>

<xsl:function name="imf:file-to-url">
<xsl:param name="filepath"/>
<xsl:param name="filepath" as="xs:string?"/>
<xsl:param name="debug-origin"/>
<xsl:sequence select="imf:file-to-url($filepath)"/>
</xsl:function>
Expand Down

0 comments on commit c5d981c

Please sign in to comment.