strictdoc-project / reqif Goto Github PK
View Code? Open in Web Editor NEWPython library for ReqIF format. ReqIF parsing and unparsing.
License: Apache License 2.0
Python library for ReqIF format. ReqIF parsing and unparsing.
License: Apache License 2.0
The first example of this is the ...in the library, this is spec_object instead of spec_object_ref. I may be reading too much into the request from the OP, but this caught me off guard as I'm getting started.
<REQ-IF xmlns="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd" xmlns:configuration="http://eclipse.org/rmf/pror/toolextensions/1.0" xmlns:id="http://pror.org/presentation/id" xmlns:xhtml="http://www.w3.org/1999/xhtml">
Currently, the order in which the declarations are hardcoded and it is enough to pass all integration test but there surely is a yet another tool that produces them in a different order.
Currently, some ReqIF objects store their original LXML tree nodes (xml_nodes
) as well as some information regarding the order in which their children tags are printed (children_tags
). The solution for each object has evolved into something different every time. Now there should be enough information to create a single abstraction that holds necessary XML metadata.
The example code on Pypi.org, handling regifz files isn't working on Python3.10 as the iterator on the dictionary used so far is returning a string.
Please adapt the line
for reqif_bundle in reqifz_bundle.reqif_bundles:
to be
for key in reqifz_bundle.reqif_bundles.keys():
as well as
for attachment in reqifz_bundle.attachments:
to be
for key, attachment in reqifz_bundle.attachments.items():
or similar
Hi I am quite new to XML and ReqIF. I know that ReqIF is a type of XML file but from what I understand, it is formatted differently. Can XML be converted to this format using the unparser?
Recently, I have received a yet another random example from a user who obtained it randomly from the internet.
In that example, there are tags that are not part of the official XSD schema, and I started to wonder if it is a good time to implement an XSD-based validator. Using the official ReqIF XSD file, it should be possible to highlight to the users when they would try to feed non-compliant files to reqif
.
I tried to use xmlschema for reading the ReqIF's XSD, but I got an issue that I reported here: sissaschool/xmlschema#360. When that issue is resolved, it is worth to give it another shot because the xmlschema
tool looks very promising.
The official ReqIF XSD: https://www.omg.org/spec/ReqIF/20110401/reqif.xsd.
Real-world example:
<SPEC-RELATION IDENTIFIER="ADB3C6E4-8014-4167-9D21-A8E13D98C6CA" LAST-CHANGE="2011-06-13T10:24:18+01:00">
<SOURCE>
<SPEC-OBJECT-REF>FUNC-REQ-1</SPEC-OBJECT-REF>
</SOURCE>
<TARGET>
<SPEC-OBJECT-REF>FUNC-REQ-2</SPEC-OBJECT-REF>
</TARGET>
<TYPE>
<SPEC-RELATION-TYPE-REF>deriveReq</SPEC-RELATION-TYPE-REF>
</TYPE>
</SPEC-RELATION>
FUNC-REQ-1
does not exist anywhere in the document.
To implement a generic support of ReqIF format, it would be nice to have simple samples produced by the ReqIF tools as follows:
Find enough realistic ReqIF examples produced by ReqIF tools:
@stanislaw , would you be open to a PR that would allow to parse reqifz
(arhived ReqIF) files?
Currently, the lib can only parse flat .reqif
files.
<SPEC-HIERARCHY xmlns:xhtml="http://www.w3.org/1999/xhtml" IDENTIFIER="_B92p0WunEeuNUYnTveUm8Q" LAST-CHANGE="2021-02-11T10:31:27.215+01:00">
It should be possible to deactivate this default behavior of lxml.
I'm still not sure how to do this, and will continue to read through the examples and unit tests. It's not clear how to navigate from a SPEC-OBJECT-REF to the SPEC-OBJECT with the same identifier to retrieve the LONG-NAME or THE-VALUE. Even once I can retrieve THE-VALUE, most of it is in XHTML, whereas I want plain text.
< <xhtml:p style=" font-style: italic">Delay <xhtml:span style="text-decoration: underline;"><= 5s</xhtml:span></xhtml:p>
---
> <xhtml:p style=" font-style: italic">Delay <xhtml:span style="text-decoration: underline;"><= 5s</xhtml:span></xhtml:p>
As specified in Figure 10.6 - Requirements, requirement relations and how requirements are structured hierarchically in a specification
.
The sample provided in #150 contains this extension's fragment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.