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
[Feature]: Write attachments (external objects) into a .reqifz and keep the original entry names
#84
I have verified that I am running the latest version of the reqifsharp
I have searched open and closed issues to ensure it has not already been reported
Description
ReqIFSerializer writes only the .reqif documents into a .reqifz archive. Attachments that the documents refer to through <xhtml:object data="..."> (images, OLE objects and other files) are not written, and each document is renamed to {index}_{header identifier}.reqif.
As a result, reading a .reqifz, changing it and writing it again produces an archive in which every embedded picture is missing, and the entry names no longer match the original. This blocks the planned editing and export feature of the ReqIF Viewer.
Reading attachments was added in #18 (ExternalObject.QueryLocalData); this issue is about writing them.
Proposal
An overload of Serialize/SerializeAsync for .reqifz that takes the attachments to include, for example the source archive (copy every entry that is not a .reqif file) or a list of entries (path and stream).
Keep the original .reqif entry names when they are known (from deserialization), and use the current naming only for new documents.
Keep the sync and async variants in step.
Acceptance criteria
Reading requirements-and-objects.reqifz (test data, 419 attachments), writing it with the new API and reading it again gives the same documents and all 419 attachments, which resolve through ExternalObject.QueryLocalData.
Entry names of the original documents are preserved.
Steps to Reproduce
varreqifs=newReqIFDeserializer().Deserialize("requirements-and-objects.reqifz").ToList();newReqIFSerializer().Serialize(reqifs,"copy.reqifz");// copy.reqifz contains only "0_rmf-d59519b5-....reqif"; the 419 media/*.png entries are gone
Activity