You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2025/03/10 19:29:00 UTC
[jira] [Commented] (DAFFODIL-2979) optional element in expression should not require indexing
[ https://issues.apache.org/jira/browse/DAFFODIL-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934011#comment-17934011 ]
Steve Lawrence commented on DAFFODIL-2979:
------------------------------------------
Took me a while to track it down, but I think this was the original bug.
https://issues.apache.org/jira/browse/DAFFODIL-2013
Which was closed saying we have the correct behavior and added tests to verify it.
I've also created a simple schema and tested as far as as Daffodil 3.0.0 and none of them require indexing on optional elements. In fact, all versions output an SDE that says "Index is only allowed on arrays". So these seems like it has been fixed a while.
Either a very old version of Daffodil is being used (since I do recall the incorrect behavior at some point), or maybe this is an edge case that we aren't checking correctly? We may need s schema snippet that can reproduce the issue.
> 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)