[
https://issues.apache.org/jira/browse/DAFFODIL-2013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720193#comment-16720193
]
Steve Lawrence commented on DAFFODIL-2013:
------------------------------------------
This is related to DAFFODIL-1118. If we add support for query style
expressions, this would likely be resolved as part of that.
> 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: Major
>
> 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
(v7.6.3#76005)