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
Validator asserts on schema-valid SPEC-OBJECT with absent optional VALUES #233
A ReqIF document can omit SPEC-OBJECT/VALUES (minOccurs=0 in the packaged ReqIF XSD). The CLI validator parses before schema validation and raises AssertionError in SpecObjectParser.parse at line 41 (assert attributes is not None) on that document.
Reproduce: save the following as baseline.reqif and run reqif validate --use-reqif-schema baseline.reqif.
<?xml version="1.0" encoding="UTF-8"?>
<REQ-IFxmlns="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"><THE-HEADER><REQ-IF-HEADERIDENTIFIER="header"><CREATION-TIME>2026-10-08T00:00:00Z</CREATION-TIME><REQ-IF-TOOL-ID>fixture</REQ-IF-TOOL-ID><REQ-IF-VERSION>1.0</REQ-IF-VERSION><SOURCE-TOOL-ID>fixture</SOURCE-TOOL-ID><TITLE>Unicode λ and CRLF</TITLE></REQ-IF-HEADER></THE-HEADER><CORE-CONTENT><REQ-IF-CONTENT><SPEC-TYPES><SPEC-OBJECT-TYPEIDENTIFIER="type_req"LAST-CHANGE="2026-10-08T00:00:00Z"/></SPEC-TYPES><SPEC-OBJECTS><SPEC-OBJECTIDENTIFIER="req_λ"LAST-CHANGE="2026-10-08T00:00:00Z"><TYPE><SPEC-OBJECT-TYPE-REF>type_req</SPEC-OBJECT-TYPE-REF></TYPE></SPEC-OBJECT><SPEC-OBJECTIDENTIFIER="req_2"LAST-CHANGE="2026-10-08T00:00:00Z"><TYPE><SPEC-OBJECT-TYPE-REF>type_req</SPEC-OBJECT-TYPE-REF></TYPE></SPEC-OBJECT></SPEC-OBJECTS></REQ-IF-CONTENT></CORE-CONTENT></REQ-IF>
Expected: schema-valid object with no values is accepted (or a typed unsupported result if the AST intentionally cannot represent absent values). Actual: uncaught AssertionError. Independent offline xmlschema 4.3.1 validation against the exact packaged reqif.xsd succeeds. Original bytes are not normalized for this check.
Activity
fix: unparse a SPEC-OBJECT that has no VALUES element
stanislaw commentedon Nov 15, 2026
Closed by #237.