Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhellingman committed Nov 23, 2024
1 parent 25c11cb commit 7b7edb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/references-func.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@
<xsl:copy-of select="f:log-debug('URL {1}; pattern: {2}; replacement: {3}.', ($url, $prefixDef/@matchPattern, $prefixDef/@replacementPattern))"/>

<!-- Handle the PGDP project id -->
<xsl:variable name="replacementPattern" select="replace($prefixDef/@replacementPattern, '\$\{PGDPProjectId\}', root($prefixDef)//idno[@type = 'PGDPProjectId'])"/>
<xsl:variable name="pgdpProjectId" select="root($prefixDef)//idno[@type = 'PGDPProjectId']"/>
<xsl:variable name="replacementPattern" select="if ($pgdpProjectId)
then replace($prefixDef/@replacementPattern, '\$\{PGDPProjectId\}', $pgdpProjectId)
else $prefixDef/@replacementPattern"/>

<xsl:value-of select="replace($locator, $prefixDef/@matchPattern, $replacementPattern)"/>
</xsl:function>
Expand Down

0 comments on commit 7b7edb0

Please sign in to comment.