Mike Beckerle created DAFFODIL-2438:
---------------------------------------

             Summary: fn:count with path argument that includes current node - 
to become runtime SDE
                 Key: DAFFODIL-2438
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2438
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
    Affects Versions: 3.0.0
            Reporter: Mike Beckerle


The fn:count, fn:exists, fn:exactly-one, fn:empty functions take a path 
expression.

The precise meaning of these is not (yet) defined by the DFDL spec if the 
argument is a path that leads to an enclosing element where the expression 
resides.

Ex: fn:count(../..) when parsing? It is unclear what this means, and it is 
problematic if this relative path is to an enclosing array that contains 
elements where this expression is being evaluated at parse time, because 
success of the expression determines the count. This is inherently circular, or 
overly-constrains implementations to an iterative sequential parse algorithm.

The DFDL Workgroup has discussed clarification of this behavior, and the very 
likely result is that use of an argument path (relative or absolute) that 
refers to an enclosing element will be defined to be a runtime SDE.

Step 1 however, is to scan existing test suite and known DFDL schemas used with 
Daffodil, and to find any such usage. It is expected any such usage can be 
revised so as not to depend on this undefined DFDL behavior. 

All 4 functions: fn:count, fn:exists, fn:exactly-one, and fn:empty must be 
considered.

Then, detection and issuing of this runtime SDE should be implemented, and 
negative tests that cause this error added to Daffodil.

 



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

Reply via email to