Report DBXsl

General Discussion
Post Reply
User avatar
Site Admin
Posts: 379
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA

Report DBXsl

Post by DougWilliams » Thu May 28, 2020 12:27 am

There was a request via the FaceBook group about only showing the Reissue Date in CATraxx when it doesn't match the Original Release Date in a report. It was suggested that a DBXsl could be used. Well I had never done a DBXsl before so I challenged myself...with success!
The second date will only display when it doesn't equal the first date.
The code could probably be cleaner but I'm happy with the results.
Annotation 2020-05-27 192240.jpg
Annotation 2020-05-27 192240.jpg (6.68 KiB) Viewed 172 times
Annotation 2020-05-27 192241.jpg
Annotation 2020-05-27 192241.jpg (95.89 KiB) Viewed 172 times
Annotation 2020-05-27 192239.jpg
Annotation 2020-05-27 192239.jpg (16.74 KiB) Viewed 172 times

Code: Select all

<!-- Album: Reissue Date -->
<?xml version="1.0" encoding="utf-8"?>
<?data type="record"?>
<?data table="album"?>

<xsl:stylesheet version="1.0"
<xsl:output method="html"/>

<xsl:include href="Common.xsl"/>

<xsl:template match="/">
    <xsl:apply-templates select="data/record/albumdata"/>

<xsl:template match="albumdata">  
  <xsl:if test="reissuedate/@year!=released/@year">
      <xsl:value-of select="reissuedate/@year"/>

Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"

Post Reply