Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Use apache daffodil cmd interface

I am new to apache daffodil and am trying to follow the example provided: https://daffodil.apache.org/examples/

I am trying to parse the file, simpleCSV using the schema, csv.dfdl.xsd. Both files are in the same folder as the daffodil.bat folder.

In cmd, I run .\daffodil.bat parse --schema csv.dfdl.xsd simpleCSV.csv

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I get the error: [error] Schema Definition Error: Error loading schema due to org.xml.sax.SAXParseException; DaffodilXMLLoader: Unable to resolve schemaLocation='csv-base-format.dfdl.xsd'. Schema context: file:/C:/Users/rinat/OneDrive/Desktop/WORK%20STUFF/apache-daffodil-3.4.0-bin/apache-daffodil-3.4.0-bin/bin/csv.dfdl.xsd Location in file:/C:/Users/rinat/OneDrive/Desktop/WORK STUFF/apache-daffodil-3.4.0-bin/apache-daffodil-3.4.0-bin/bin/csv.dfdl.xsd

How do I reslove this?

Thank you

>Solution :

You need to copy csv-base-format.dfdl.xsd (found in the same src/ directory as csv.dfdl.xsd) into the same directory as your csv.dfdl.xsd file. That file provides a number of default settings imported by csv.dfdl.xsd, so they must be in the same directory.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading