[
https://issues.apache.org/jira/browse/DAFFODIL-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dave Thompson closed DAFFODIL-2773.
-----------------------------------
Verified the specified commit (commit a1f7f96f84c853aeafa468f5d5f405d61ef280b9)
is included in the latest pull from the daffodil repository.
Verified, via review, changes identified in the commit comment were
implemented.
Verified the affected daffodil subproject sbt test suites executed
successfully, including the modified and added tests.
> Expression .[intexpr] should create warning
> -------------------------------------------
>
> Key: DAFFODIL-2773
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2773
> Project: Daffodil
> Issue Type: Improvement
> Components: Front End
> Affects Versions: 3.4.0
> Reporter: Mike Beckerle
> Assignee: Olabusayo Kilo
> Priority: Major
> Fix For: 4.0.0
>
>
> At some point people started writing expressions involving 'self' that is
> like ".[1]".
> This may be due to a daffodil bug (current or since resolved) that required
> this if the current element is declared as an array or optional.
> This should not be necessary. If our schema compiler requires ".[1]" on
> array/optional element expresions, that is a bug.
> Even if an element is declared optional or array, the expression "."
> evaluated on that element is not referring to the whole array, but to the
> current individual node.
> The expression ".[1]" is exactly equivalent to "." and so a warning should be
> issued by the schema compiler if any expression is written like
> ".[...anything ...]".
> This needs to be a warning because portable DFDL actually does allow this.
> That's becasue to simplify implementations the DFDL expression language was
> defined so that it's possible to implement it via minor mods to an existing
> XPath implementation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)