[
https://issues.apache.org/jira/browse/DAFFODIL-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16702854#comment-16702854
]
Michael Beckerle commented on DAFFODIL-284:
-------------------------------------------
I did study this one a bit more.
The problem is just that when the group members of a model group are being
gathered, it traverses (transparently) group references.
If the group reference happens to be a circular path, then this recursion is
never detected.
An algorithm that keeps a stack of what group defs contain the existing model
group is needed, and an explicit check for a group ref to a we are already
inside of.
This is a little bit tricky becasue someday in the future we want to lift the
restrction that prevents recursive types in DFDL. (at least as an option).
Recursive paths that run through optional elements (as arrays/optionals, or
optional via a choice) are potentially Ok.
> hidden group ref - circular stack overflow
> ------------------------------------------
>
> Key: DAFFODIL-284
> URL: https://issues.apache.org/jira/browse/DAFFODIL-284
> Project: Daffodil
> Issue Type: Bug
> Components: Back End, Front End, General, Middle "End"
> Reporter: Michael Beckerle
> Priority: Major
>
> Implementation ideas: just add a dfdl:__hidden__="true" attribute to the
> nodes that come from a hidden group ref. TDML runner can strip them off
> before comparing actual to expected.
> (This does not meet all the requirements for the infoset of DFDL, because the
> hidden elements will take up positions in the infoset during processing
> thereby making Xpath expression in the DFDL work differently than if the
> nodes were behaving as hidden all along.)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)