You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: a spec hierarchy takes the IS-TABLE-INTERNAL of its child #105
When a SpecHierarchy reads its CHILDREN, DeserializeSpecHierarchy and DeserializeSpecHierarchyAsync read IS-TABLE-INTERNAL from each child SPEC-HIERARCHY element and assign it to the parent:
(ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs, in both the sync and async DeserializeSpecHierarchy.)
The child reads its own IS-TABLE-INTERNAL again in its ReadXml, so the child is right, but the parent ends up with the value of its last child that has the attribute:
a parent without IS-TABLE-INTERNAL whose child has IS-TABLE-INTERNAL="true" becomes table-internal, and is written back with IS-TABLE-INTERNAL="true";
a parent with IS-TABLE-INTERNAL="true" whose last child has IS-TABLE-INTERNAL="false" loses its value.
Proposal
Remove the two blocks; IS-TABLE-INTERNAL is read by each hierarchy for itself.
Acceptance criteria
A spec hierarchy keeps its own IS-TABLE-INTERNAL when read and written again, whatever its children have, in the sync and async readers.
Steps to Reproduce
Take a ReqIF file with a SPEC-HIERARCHY that has no IS-TABLE-INTERNAL and a child SPEC-HIERARCHY with IS-TABLE-INTERNAL="true".
var reqifs = new ReqIFDeserializer().Deserialize("in.reqif");
The parent's IsTableInternal is true; new ReqIFSerializer().Serialize(reqifs, "out.reqif") writes IS-TABLE-INTERNAL="true" on the parent.
Activity