[ 
https://issues.apache.org/jira/browse/DAFFODIL-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Beckerle updated DAFFODIL-1279:
------------------------------------
    Priority: Minor  (was: Major)

> Need DPath warnings when paths are not encapsulated with fn:exists(....)
> ------------------------------------------------------------------------
>
>                 Key: DAFFODIL-1279
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1279
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Back End, Diagnostics, Middle "End", Usability
>    Affects Versions: 1.0.0
>            Reporter: Mike Beckerle
>            Priority: Minor
>
> Expressions like 
> {code}
> { ../foo/bar eq 3 }
> {code}
> are very error prone. If node ../foo/bar doesn't exist you get a runtime 
> Schema Definition Error, which is fatal, not backtrackable. 
> Really what is needed is:
> {code}
> { if fn:exists(../foo/bar) then ../foo/bar eq 3 else daf:error("....") }
> {code}
> The DPath compiler should warn when a path is being used which *may* not 
> exist, but is not wrapped in fn:exists(....) and if-then-else.
> But that may really not be the right warning. Probably such expressions 
> really should be moved to a location in the schema where the elements they 
> are referring to simply must exist. E.g., if the expression was on element 
> bar, or a sub-component within the schema of element bar, then the existence 
> of element bar (and its parent foo) is implied and the expression can't get a 
> runtime SDE. 
> See also related Bug DFDL-1278.



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

Reply via email to