Fix TiGL not opening CPACS v3.5 data sets #1010
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change enables TiGL to search for the
cpacsVersion
element according to both CPACS v<3.5 and v>=3.5.Description
See #1009 for discussions on this topic.
A new CPACS v3.5 header could look like this:
I suggest that the default behavior is already to search for the
versionElement
in theversionInfo
node, as this is always the most up-to-date in case of doubt (currently CPACS XSD still allows the element in the old location, where it is labeled as deprecated). As soon as TiGL has been upgraded to v3.5, we could also return a deprecation warning.Since the query is only made via XPath, changes to the generated classes have no influence on the version query (as far as I have seen). Nevertheless, I have generated the classes up to the
versionInfo
element, as they were previously also available for the oldupdate
node.This would fix #1009.
How Has This Been Tested?
CPACSVersion.newCPACSHeader
Screenshots, that help to understand the changes(if applicable):
Current behavior:
New behavior:
Checklist: