|
Post by DougWilliams on Sept 7, 2020 14:07:00 GMT
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.    <!-- Album: Reissue Date --> <?xml version="1.0" encoding="utf-8"?> <?data type="record"?> <?data table="album"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/>
<xsl:include href="Common.xsl"/>
<xsl:template match="/"> <html> <body> <xsl:apply-templates select="data/record/albumdata"/> </body> </html> </xsl:template>
<xsl:template match="albumdata"> <xsl:if test="reissuedate/@year!=released/@year"> <xsl:value-of select="reissuedate/@year"/> </xsl:if> </xsl:template>
</xsl:stylesheet>
|
|