You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2018/01/05 19:34:00 UTC

[jira] [Comment Edited] (DAFFODIL-288) TDML runner should validate expected infoset

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

Michael Beckerle edited comment on DAFFODIL-288 at 1/5/18 7:33 PM:
-------------------------------------------------------------------

This would also require test cases to be written with correct namespace prefixes on elements. 

Currently this is enforced for unparser tests, but parser tests can have an infoset with incorrect namespaces and prefixes and it is accepted anyway.

This code is in XMLUtils.computeDiffOne. When two elements are compared and their labels match, the namespaces, and prefixes, are ignored.
(as of 2018-01-05)

This comparison code could be enhanced to enforce the namespaces be correct for all elements (and probably should be), but if we simply validated the expected infoset against the DFDL schema for the expected root element, that will enforce the namespaces also.

The diagnostics from the validation would be test-case validation, i.e., daffodil would not even have been run yet. 


was (Author: mbeckerle):
This would also require test cases to be written with correct namespace prefixes on elements. 

Currently this is enforced for unparser tests, but parser tests can have an infoset with incorrect namespaces and prefixes and it is accepted anyway.

This code is in XMLUtils.computeDiffOne. When two elements are compared and their labels match, the namespaces, and prefixes, are ignored.
(as of 2018-01-05)


> TDML runner should validate expected infoset
> --------------------------------------------
>
>                 Key: DAFFODIL-288
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-288
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Infrastructure, TDML Runner
>            Reporter: Michael Beckerle
>            Priority: Minor
>             Fix For: deferred
>
>
> The TDML runner should validate the expected infoset against the DFDL schema (using it just as an XML schema). 
> The above should happen before the test is even run.
> Similarly, the TDML runner should validate the actual infoset against the DFDL schema, using it as an XML schema. 
> This should happen before the actual and expected infosets are compared.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)