Simplify footer text when everything is identical. master
authorNick Bowler <nbowler@draconx.ca>
Tue, 15 Jun 2021 02:32:46 +0000 (22:32 -0400)
committerNick Bowler <nbowler@draconx.ca>
Tue, 15 Jun 2021 02:32:46 +0000 (22:32 -0400)
When all images have an identical copyright and license to the main
document, there is no reason to mention this in the footer.

layouts/default.xsl

index 7325708557a89089d76469a80a5fb11b9f78f610..837a792e4c7f734b8b8f591a77b87955a8a8519f 100644 (file)
   <xsl:variable name='node' select='.' />
   <p>
     <xsl:choose>
-      <xsl:when test='/document/image[license != $node]'>
+      <xsl:when test='/document/image[license/identifier != $node/identifier]'>
         <xsl:text>Except as otherwise noted, copying</xsl:text>
       </xsl:when>
       <xsl:otherwise>Copying</xsl:otherwise>
       <div id='footer'>
         <xsl:apply-templates select='/document/copyright' />
         <xsl:apply-templates select='/document/license' />
-        <xsl:if test='/document/image'>
+        <xsl:if test='/document/image[copyright != /document/copyright
+                      or license/identifier != /document/license/identifier]'>
           <xsl:call-template name='image-attribution' />
         </xsl:if>
         <xsl:apply-templates select='/document/source' />