Uploaded image for project: 'Schematron Validator'
  1. Schematron Validator
  2. SCHVAL-112

Automatically recompile a schematron if source is newest

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Labels:
      None
    • Account:
      KELA-002 (KELA002)

      Description

      This is a fix offered by Kela.

       we did a small fix for SchematronValidator, so that it recompiles the schematron (into an .xsl file) if it has been updated after the last compilation. I am not sure whether that is a bug or a feature in the main Gazelle, but it has helped us to make schematron updates easier.

      The fix is to this file:
      https://scm.gforge.inria.fr/anonscm/svn/gazelle/Maven/SchematronValidator/trunk/SchematronValidator-ejb/src/main/java/net/ihe/gazelle/sch/validator/action/ResultParser.java

      and the code that is affected is here:

      ------------remove this---------------
      if (!compiledSch.exists()){
      SchematronManager sch = new SchematronManager();
      sch.compileSchematron(schematron);
      }
      ------------remove this---------------

      ------------replace by this---------------
      boolean needToRecompile = true;

      if(compiledSch.exists()) {
      long compiledDate = compiledSch.lastModified();
      File schFile = new File(schematron.getPath());
      if(schFile.exists()) {
      long schDate = schFile.lastModified();
      if(compiledDate >= schDate) {
      needToRecompile = false;
      }
      }
      }

      if (needToRecompile){
      SchematronManager sch = new SchematronManager();
      sch.compileSchematron(schematron);
      }
      ------------replace by this---------------

        Attachments

          Activity

            People

            • Assignee:
              aberge Anne-Gaelle Berge
              Reporter:
              aberge Anne-Gaelle Berge
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Potential Duplicates