Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1800

CLI should search classpath for schema and data file or infoset file.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • None
    • None
    • CLI, Usability
    • None

    Description

      Using our new Standard DFDL Schema Project Layout, an example command line ends up looking like:

      $ ./bin/daffodil parse --schema ~/examples/CSV/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd ~/examples/CSV/src/test/resources/com/tresys/csv/data/simpleCSV.csv

      Notice how long those file names are.

      Now, if I look at the CLI instructions, it describes use of DAFFODIL_CLASSPATH.

      I might want to do this in order to shorten my massively long paths:

      export DAFFODIL_CLASSPATH="~/examples/CSV/src/test/resources:~/examples/CSV/src/main/resources"

      Then shorten the command line to

      $ ./bin/daffodil parse --schema com/tresys/csv/xsd/csv.dfdl.xsd com/tresys/csv/data/simpleCSV.csv

      Which is still long, but much more reasonable.

      However, this doesn't work because only xs:include and xs:import search the classpath. The CLI doesn't search the classpath when trying to find the schema or the input file.

      This improvement would change CLI so that it would try to use the supplied path directly, but if file is not found, it would then search the classpath for it. So that the same path that would be specified in the schemaLocation attribute of an xs:import or xs:include could be used on the command line.

      With this change, our standard schema project layout is much less painful for CLI users. As it stands now the standard schema project layout makes it pretty painful for people who want to issue CLI commands and who actually type them.

      Note that this change is completely backward compatible.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: