Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unparser forward reference variables #22

Open
smhdfdl opened this issue Dec 10, 2020 · 2 comments
Open

Unparser forward reference variables #22

smhdfdl opened this issue Dec 10, 2020 · 2 comments
Labels
DFDL 2.0 For issues associated with DFDL v2.0 (next major revision) experimental in use indicates implemented and feature being used

Comments

@smhdfdl
Copy link
Contributor

smhdfdl commented Dec 10, 2020

Scenario in the PCAP schema that uses several dfdl:outputValueCalc. To simplify the expressions, would like to use a variable with a value set by dfdl:newVariableInstance. The problem is that the rules for variables are different from those for dfdl:outputValueCalc, specifically variables can not refer forwards (because they are evaluated on both parse and unparse) whereas that is the point of dfdl:outputValueCalc. To ease this would require a change to the spec. Candidate for 2.0. Daffodil to implement as as an experimental feature.

@smhdfdl smhdfdl added DFDL 2.0 For issues associated with DFDL v2.0 (next major revision) experimental labels Dec 10, 2020
@smhdfdl
Copy link
Contributor Author

smhdfdl commented Mar 23, 2021

@mbeckerle Will the team be writing this up as an experience document?

@mbeckerle
Copy link
Collaborator

I think there is, or was, an experience document planned about the whole computed/calculated values feature set, about which there was some uncertainty that we had it all coherently specified.

This issue is the last in that suite of issues. It's all working. The draft that we need to turn into an experience doc is on the Daffodil wiki here: https://s.apache.org/daffodil-experience-with-computed-elements.

There is a section there about dfdl:newVariableInstance with forward reference, but it doesn't mention the direction="parse/unparse/both" attribute we're suggesting is needed on dfdl:defineVariable to make dfdl:newVariableInstance work properly, and the example needs to be better.

@mbeckerle mbeckerle added the in use indicates implemented and feature being used label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DFDL 2.0 For issues associated with DFDL v2.0 (next major revision) experimental in use indicates implemented and feature being used
Projects
None yet
Development

No branches or pull requests

2 participants