Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1832

schemaLocation with package-style directories for schema files - doesn't work properly


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0.0
    • None
    • Front End
    • None

      See new test-stdLayout subproject within daffodil (on branch review-mjb-1832)

      The test in scala-debug test_outer_01 fails.

      This test fails because the src/main/resources/org1/xsd schema files cannot include/import using schemaLocation="org2/xsd/..."

      You can an error like:

      Schema Definition Error: Error loading schema due to org.xml.sax.SAXParseException;
       systemId: file:/home/.../test-stdLayout/target/eclipse/classes/org2/xsd/org2/xsd/payload.xsd; lineNumber: 33; columnNumber: 38; src-resolve: Cannot resolve the name 'tns:Data' to a(n) 'element declaration' component.

      If you look at that file path, notice the org2/xsd/org2/xsd is doubled up. I don't know how exactly this happens, but it happens in Xerces code.

      Back when our projects just had src/main/resources/xsd, these paths would come out with "xsd/xsd" doubled up, and we put in a hack to look for that and remove it.

      But now that we're using package-style directory names, it's not so easy to just hack it, as whatever package name you would have, it will get doubled.

              mbeckerle.dfdl Mike Beckerle
              mbeckerle.dfdl Mike Beckerle
              0 Vote for this issue
              2 Start watching this issue