[
https://issues.apache.org/jira/browse/DAFFODIL-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934023#comment-17934023
]
Mike Beckerle commented on DAFFODIL-2979:
-----------------------------------------
I will look at the schema that was causing this.
One odd situation is if you have dfdl:occursCountKind='parsed', and
maxOccurs="1" minOccurs="0", that's an array, not an optional element. Because
'parsed' means the min/max are only used for validation, not to drive parsing.
That would explain it, but need to verify this.
> optional element in expression should not require indexing
> ----------------------------------------------------------
>
> Key: DAFFODIL-2979
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2979
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Affects Versions: 3.10.0
> Reporter: Mike Beckerle
> Priority: Major
>
>
> Suppose 'bar' is an optional element, i.e., minOccurs 0, maxOccurs 1 and
> dfdl:occursCountKind is not 'parsed' (because that would make it an array).
>
> Then expressions like:
> ```
> foo/bar/baz
> ```
> should *not* require indexing a child of the bar element. I.e., this should
> *not* be required but was reported that it is required:
> ```
> foo/bar[1]/baz
> ```
> The indexing should only be _required_ for arrays.
> Note: I looked for this bug pre-existing but did not find it. I thought we
> already had this ticket.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)