conditional call for crypto function
continuous-integration/drone/push Build is failing Details

This commit is contained in:
vv01f 2023-11-08 20:14:49 +01:00
parent 7259266fd1
commit c30565d4a0
1 changed files with 9 additions and 8 deletions

View File

@ -380,14 +380,15 @@
</xsl:template> </xsl:template>
<xsl:template match="/page/portal/item"> <xsl:template match="/page/portal/item">
<!-- 1 (not really) random character 1-9 and blank --> <!-- 1 (not really) random character 1-9 and blank
<!-- crypto:sha1 depends on crypto being built with xsltproc
deactivated until nix package has crypto support -->
--> <xsl:variable name="diceroll"><!--
<xsl:variable name="diceroll">4</xsl:variable> --><xsl:choose><!--
<!-- --><xsl:when test="not(function-available('crypto:sha1'))">4</xsl:when><!--
<xsl:variable name="diceroll" select="translate(substring(crypto:sha1(.),1,1),'0abcdef','')"/> --><xsl:otherwise><xsl:text select="translate(substring(crypto:sha1(.),1,1),'0abcdef','')"/></xsl:otherwise><!--
--> --></xsl:choose><!--
--></xsl:variable>
<article> <article>
<xsl:if test="@class"> <xsl:if test="@class">
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>