[
https://issues.apache.org/jira/browse/DAFFODIL-2013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence resolved DAFFODIL-2013.
--------------------------------------
Resolution: Invalid
This bug is wrong. Predicates are not required to access optional elements, in
fact they are not allowed. Predicates are only allowed on arrays (i.e.
maxOccurs > 1).
Commit 36b98fc2d78b0485af614202b4cd0c51cec9a2e3 adds a test showing this is the
case.
Closing as "Invalid.
> Predicate required for when accessing optional elements in expression
> ---------------------------------------------------------------------
>
> Key: DAFFODIL-2013
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2013
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Affects Versions: 2.2.0
> Reporter: Steve Lawrence
> Priority: Minor
>
> Behind the scenes we treat optional elements (e.g. minOccurs="1"
> dfdl:lengthKind="implicit"), as arrays that should just always have either
> zero or one elements. This means that when an expression attempts to access
> this element, a predicate of [1] is required. Otherwise you get an error
> about "Query-style paths not supported". We should have logic to treat
> optional elements special so that the predicate is not mandatory.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)