Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1728

JobScheduler should use XSLT2 to transform e-mail stylesheets

    XMLWordPrintable

Details

    Description

      Current Situation

      • The xsl stylesheet ./config/scheduler_mail.xsl is used to create the body of JobScheduler e-mails.
      • With <xsl:value-of select="/scheduler_event/@time"/> the time of event can be included into the e-mail body. The value is based on UTC.
      • To convert UTC timestamps to local time of the JobScheduler Master server, it should be possible to use e.g.
         <xsl:value-of select="adjust-time-to-timezone( xs:time('20:45:00.0+01:00'), xs:dayTimeDuration('PT1H') )"/>
        

        which is only available with XSLT 2.

      Desired Behavior

      • JobScheduler should use a compatibe XSLT 2 library to provide the option to use functions as e.g. adjust-time-to-timezone.
      • The time of the event that is stated with the JobScheduler e-mail should consider daylight saving times.

      Workaround

      • Download a current Saxon XML parser 9.8
      • Stop the JobScheduler Master
      • Replace the existing Saxon-HE-9.5.1-5.jar by the newer version Saxon-HE-9.8.0-4.jar in your ./lib/3rd-party directory.
      • Modify Java options in ./config/factory.ini to include a property for use of the Saxon XML parser.
        [java]
        options                 = -Djavax.xml.transform.TransformerFactory="net.sf.saxon.TransformerFactoryImpl" -Dlog4j.configuration="file:///${SCHEDULER_HOME}/lib/log4j.properties"
        
      • Replace the existing scheduler_mail.xsl stylesheet by the attached version of scheduler_mail.xsl.
      • Restart JobScheduler.
      • Your e-mail output of JobScheduler mails should now include the timestamp for events in the timezone of the JobScheduler Master server.

      Attachments

        Issue Links

          Activity

            People

              ap Andreas Püschel
              Armin-Noll Armin Noll
              Andreas Püschel Andreas Püschel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: