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

Error caused by Invalid Namespace definition could be more clear.

XMLWordPrintableJSON

    • Icon: Comment Comment
    • Resolution: Fixed
    • Icon: Major Major
    • s10
    • None
    • None
    • None

      When testing out the limits of namespaces, I created two tests to demonstrate that the "middle dot" (ยท) is acceptable within a namespace name, but not as the first character. In the test that I expect to fail, this is the error I get:

      [info] - test_namespaceSpecialChars2 *** FAILED ***
      [info] org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.
      [info] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      [info] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      [info] at edu.illinois.ncsa.daffodil.xml.DaffodilXMLLoader.loadXML(DaffodilXMLLoader.scala:434)
      [info] at scala.xml.factory.XMLLoader$class.loadFile(XMLLoader.scala:47)
      [info] at edu.illinois.ncsa.daffodil.xml.DaffodilXMLLoader.loadFile(DaffodilXMLLoader.scala:411)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.findModel(TDMLRunner.scala:273)
      [info] at edu.illinois.ncsa.daffodil.tdml.TestCase.findModel(TDMLRunner.scala:318)
      [info] at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:339)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTestWithDataVolumes(TDMLRunner.scala:222)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:213)

      Would it be possible to get a more descriptive error (or at least a Schema Definition Error so it can be matched in a tdml test)? I was also trying to figure out if DFDL-506 is at all related to this.

      The test is namespaceSpecialChars2 in:

      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/namespaceSpecialChar2.dfdl.xsd
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/namespaces.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section06/namespaces/TestNamespacesDebug.scala

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: