You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/01/13 21:49:00 UTC

[jira] [Commented] (DAFFODIL-1124) DPath: xs:date constructor more lax - allows missing digits

    [ https://issues.apache.org/jira/browse/DAFFODIL-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264447#comment-17264447 ] 

Dave Thompson commented on DAFFODIL-1124:
-----------------------------------------

Test TestDFDLExpressions.test_date_constructor_01 is still commented out. Uncommented and executed the test and got the following error. Appears to still be an issue.

[info] Test org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_date_constructor_01 started
[error] Test org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_date_constructor_01 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) Did not find diagnostic message "Invalid date "1991-03-4" (Day must be two digits)" in any of the actual diagnostic messages: 
[error] Parse Error: Failed to parse xs:date from string: 1991-03-4 (within Expression Evaluation Error: Failed to parse xs:date from string: 1991-03-4
[error] Schema context: ex:date Location line 6660 column 12 in file:/tmp/constructorSchema2740833429743634149.dfdl.xsd)
[error] Schema context: ex:date Location line 6660 column 12 in file:/tmp/constructorSchema2740833429743634149.dfdl.xsd, took 0.105 sec
[error]     at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error]     at org.apache.daffodil.tdml.VerifyTestCase$.$anonfun$verifyAllDiagnosticsFound$4(TDMLRunner.scala:1564)
[error]     at org.apache.daffodil.tdml.VerifyTestCase$.$anonfun$verifyAllDiagnosticsFound$4$adapted(TDMLRunner.scala:1553)
[error]     at scala.collection.immutable.List.foreach(List.scala:392)
[error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyAllDiagnosticsFound(TDMLRunner.scala:1553)
[error]     at org.apache.daffodil.tdml.TestCase.checkDiagnosticMessages(TDMLRunner.scala:811)
[error]     at org.apache.daffodil.tdml.ParserTestCase.runParseExpectErrors(TDMLRunner.scala:928)
[error]     at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$4(TDMLRunner.scala:856)
[error]     at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$4$adapted(TDMLRunner.scala:853)
[error]     at scala.util.Either$RightProjection.foreach(Either.scala:652)
[error]     at org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:853)
[error]     at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:796)
[error]     at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:386)
[error]     at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error]     at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error]     at org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_date_constructor_01(TestDFDLExpressions.scala:803)
[error]     ...

> DPath: xs:date constructor more lax - allows missing digits
> -----------------------------------------------------------
>
>                 Key: DAFFODIL-1124
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1124
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, ICU
>    Affects Versions: s15
>            Reporter: Jessie Chab
>            Priority: Minor
>
> Note: this issue is in the dpath branches, not the current 0.15.0
> In the XPath implementation of Daffodil, if you provided the xs:date constructor with a date like the following: 1991-03-4, you would get this error:
> Invalid date "1991-03-4" (Day must be two digits). Now the function accepts sincle-digit days and it parses as 1991-03-04+00:00.
> This may be our expected behavior but I thought I should note the discrepancy.
> See test test_date_constructor_01 in the following file:
> daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_functions/Functions.tdml



--
This message was sent by Atlassian Jira
(v8.3.4#803005)