First time compile reqif work with visual studio 2022
authorandre ebersold <andre.ebersold@siemens.com>
Tue, 18 Jun 2024 07:11:09 +0000 (09:11 +0200)
committerandre ebersold <andre.ebersold@siemens.com>
Tue, 18 Jun 2024 07:11:09 +0000 (09:11 +0200)
CMakeLists.txt
doc/reqif.xsd [new file with mode: 0644]
reqif.cpp
src/properties/CMakeLists.txt
src/properties/reference.lemon
src/properties/reference_parser_base.h
src/xml/reqif/reqif_element.h
src/xml/reqif/reqif_elements_parser.cpp

index e387ce7005beafc036304c19de162825990939bb..0d551c8983bb52ea9857cc4c227709b4fa68c4a6 100644 (file)
@@ -31,8 +31,12 @@ IF(WIN32)
           ${CMAKE_BINARY_DIR}/lib/src/winexpat/expat
   )
   SET(EXPAT_INCLUDE_DIR "${CMAKE_BINARY_DIR}/lib/installed/include" CACHE STRING "Expat include dir")
-  SET(EXPAT_LIBRARY "${CMAKE_BINARY_DIR}/lib/installed/lib/libexpat.lib" CACHE STRING "Expat library")
-
+  MESSAGE(STATUS "Build Type : ${CMAKE_BUILD_TYPE}") 
+  IF (WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+    SET(EXPAT_LIBRARY "${CMAKE_BINARY_DIR}/lib/installed/lib/libexpatd.lib" CACHE STRING "Expat library")
+  ELSE()         
+    SET(EXPAT_LIBRARY "${CMAKE_BINARY_DIR}/lib/installed/lib/libexpat.lib" CACHE STRING "Expat library")
+  ENDIF()
   INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
 
 ELSE(WIN32)
diff --git a/doc/reqif.xsd b/doc/reqif.xsd
new file mode 100644 (file)
index 0000000..049db15
--- /dev/null
@@ -0,0 +1,893 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+    xmlns="http://www.w3.org/1999/xhtml" xmlns:REQIF="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
+    xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified"
+    elementFormDefault="qualified" targetNamespace="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd">
+  <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+  <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.omg.org/spec/ReqIF/20110402/driver.xsd"/>
+  <xsd:element name="REQ-IF" type="REQIF:REQ-IF"/>
+  <xsd:simpleType name="LOCAL-REF">
+    <xsd:restriction base="xsd:IDREF"/>
+  </xsd:simpleType>
+  <xsd:simpleType name="GLOBAL-REF">
+    <xsd:restriction base="xsd:string"/>
+  </xsd:simpleType>
+  <xsd:complexType name="ALTERNATIVE-ID">
+    <xsd:all/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:string" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-BOOLEAN">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-BOOLEAN" type="REQIF:ATTRIBUTE-VALUE-BOOLEAN"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-BOOLEAN-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-DATE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-DATE" type="REQIF:ATTRIBUTE-VALUE-DATE"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-DATE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-ENUMERATION">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-ENUMERATION" type="REQIF:ATTRIBUTE-VALUE-ENUMERATION"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-ENUMERATION-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+    <xsd:attribute name="MULTI-VALUED" type="xsd:boolean" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-INTEGER">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-INTEGER" type="REQIF:ATTRIBUTE-VALUE-INTEGER"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-INTEGER-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-REAL">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-REAL" type="REQIF:ATTRIBUTE-VALUE-REAL"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-REAL-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-STRING">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-STRING" type="REQIF:ATTRIBUTE-VALUE-STRING"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-STRING-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-DEFINITION-XHTML">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DEFAULT-VALUE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-XHTML" type="REQIF:ATTRIBUTE-VALUE-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="DATATYPE-DEFINITION-XHTML-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-BOOLEAN">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="THE-VALUE" type="xsd:boolean" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-DATE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="THE-VALUE" type="xsd:dateTime" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-ENUMERATION">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="VALUES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ENUM-VALUE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-INTEGER">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="THE-VALUE" type="xsd:integer" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-REAL">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="THE-VALUE" type="xsd:double" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-STRING">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="THE-VALUE" type="xsd:string" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ATTRIBUTE-VALUE-XHTML">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="1" name="THE-VALUE" type="REQIF:XHTML-CONTENT"/>
+      <xsd:element maxOccurs="1" minOccurs="0" name="THE-ORIGINAL-VALUE" type="REQIF:XHTML-CONTENT"/>
+      <xsd:element maxOccurs="1" minOccurs="1" name="DEFINITION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="IS-SIMPLIFIED" type="xsd:boolean" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-BOOLEAN">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-DATE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-ENUMERATION">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPECIFIED-VALUES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ENUM-VALUE" type="REQIF:ENUM-VALUE"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-INTEGER">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+    <xsd:attribute name="MAX" type="xsd:integer" use="required"/>
+    <xsd:attribute name="MIN" type="xsd:integer" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-REAL">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="ACCURACY" type="xsd:integer" use="required"/>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+    <xsd:attribute name="MAX" type="xsd:double" use="required"/>
+    <xsd:attribute name="MIN" type="xsd:double" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-STRING">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+    <xsd:attribute name="MAX-LENGTH" type="xsd:integer" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="DATATYPE-DEFINITION-XHTML">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="EMBEDDED-VALUE">
+    <xsd:all/>
+    <xsd:attribute name="KEY" type="xsd:integer" use="required"/>
+    <xsd:attribute name="OTHER-CONTENT" type="xsd:string" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="ENUM-VALUE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="PROPERTIES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="EMBEDDED-VALUE" type="REQIF:EMBEDDED-VALUE"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="RELATION-GROUP">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="SOURCE-SPECIFICATION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPECIFICATION-REF" type="REQIF:GLOBAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-RELATIONS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPEC-RELATION-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TARGET-SPECIFICATION">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPECIFICATION-REF" type="REQIF:GLOBAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="RELATION-GROUP-TYPE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="RELATION-GROUP-TYPE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-ATTRIBUTES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN" type="REQIF:ATTRIBUTE-DEFINITION-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE" type="REQIF:ATTRIBUTE-DEFINITION-DATE"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION" type="REQIF:ATTRIBUTE-DEFINITION-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER" type="REQIF:ATTRIBUTE-DEFINITION-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL" type="REQIF:ATTRIBUTE-DEFINITION-REAL"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING" type="REQIF:ATTRIBUTE-DEFINITION-STRING"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML" type="REQIF:ATTRIBUTE-DEFINITION-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="REQ-IF">
+    <xsd:sequence>
+      <xsd:element maxOccurs="1" minOccurs="1" name="THE-HEADER">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="REQ-IF-HEADER" type="REQIF:REQ-IF-HEADER"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="CORE-CONTENT">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="REQ-IF-CONTENT" type="REQIF:REQ-IF-CONTENT"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="TOOL-EXTENSIONS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="REQ-IF-TOOL-EXTENSION" type="REQIF:REQ-IF-TOOL-EXTENSION"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute ref="xml:lang" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="REQ-IF-CONTENT">
+    <xsd:sequence>
+      <xsd:element maxOccurs="1" minOccurs="0" name="DATATYPES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="DATATYPE-DEFINITION-BOOLEAN" type="REQIF:DATATYPE-DEFINITION-BOOLEAN"/>
+            <xsd:element name="DATATYPE-DEFINITION-DATE" type="REQIF:DATATYPE-DEFINITION-DATE"/>
+            <xsd:element name="DATATYPE-DEFINITION-ENUMERATION" type="REQIF:DATATYPE-DEFINITION-ENUMERATION"/>
+            <xsd:element name="DATATYPE-DEFINITION-INTEGER" type="REQIF:DATATYPE-DEFINITION-INTEGER"/>
+            <xsd:element name="DATATYPE-DEFINITION-REAL" type="REQIF:DATATYPE-DEFINITION-REAL"/>
+            <xsd:element name="DATATYPE-DEFINITION-STRING" type="REQIF:DATATYPE-DEFINITION-STRING"/>
+            <xsd:element name="DATATYPE-DEFINITION-XHTML" type="REQIF:DATATYPE-DEFINITION-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-TYPES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="RELATION-GROUP-TYPE" type="REQIF:RELATION-GROUP-TYPE"/>
+            <xsd:element name="SPEC-OBJECT-TYPE" type="REQIF:SPEC-OBJECT-TYPE"/>
+            <xsd:element name="SPEC-RELATION-TYPE" type="REQIF:SPEC-RELATION-TYPE"/>
+            <xsd:element name="SPECIFICATION-TYPE" type="REQIF:SPECIFICATION-TYPE"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-OBJECTS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPEC-OBJECT" type="REQIF:SPEC-OBJECT"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-RELATIONS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPEC-RELATION" type="REQIF:SPEC-RELATION"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPECIFICATIONS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPECIFICATION" type="REQIF:SPECIFICATION"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-RELATION-GROUPS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="RELATION-GROUP" type="REQIF:RELATION-GROUP"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+  </xsd:complexType>
+  <xsd:complexType name="REQ-IF-HEADER">
+    <xsd:sequence>
+      <xsd:element maxOccurs="1" minOccurs="0" name="COMMENT" type="xsd:string"/>
+      <xsd:element maxOccurs="1" minOccurs="1" name="CREATION-TIME" type="xsd:dateTime"/>
+      <xsd:element maxOccurs="1" minOccurs="0" name="REPOSITORY-ID" type="xsd:string"/>
+      <xsd:element maxOccurs="1" minOccurs="1" name="REQ-IF-TOOL-ID" type="xsd:string"/>
+      <xsd:element fixed="1.0" maxOccurs="1" minOccurs="1" name="REQ-IF-VERSION" type="xsd:string"/>
+      <xsd:element maxOccurs="1" minOccurs="1" name="SOURCE-TOOL-ID" type="xsd:string"/>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TITLE" type="xsd:string"/>
+    </xsd:sequence>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPEC-HIERARCHY">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="CHILDREN">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPEC-HIERARCHY" type="REQIF:SPEC-HIERARCHY"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="EDITABLE-ATTS">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING-REF" type="REQIF:LOCAL-REF"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="OBJECT">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPEC-OBJECT-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="IS-EDITABLE" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="IS-TABLE-INTERNAL" type="xsd:boolean" use="optional"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPEC-OBJECT">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="VALUES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-BOOLEAN" type="REQIF:ATTRIBUTE-VALUE-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-VALUE-DATE" type="REQIF:ATTRIBUTE-VALUE-DATE"/>
+            <xsd:element name="ATTRIBUTE-VALUE-ENUMERATION" type="REQIF:ATTRIBUTE-VALUE-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-VALUE-INTEGER" type="REQIF:ATTRIBUTE-VALUE-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-VALUE-REAL" type="REQIF:ATTRIBUTE-VALUE-REAL"/>
+            <xsd:element name="ATTRIBUTE-VALUE-STRING" type="REQIF:ATTRIBUTE-VALUE-STRING"/>
+            <xsd:element name="ATTRIBUTE-VALUE-XHTML" type="REQIF:ATTRIBUTE-VALUE-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPEC-OBJECT-TYPE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPEC-OBJECT-TYPE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-ATTRIBUTES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN" type="REQIF:ATTRIBUTE-DEFINITION-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE" type="REQIF:ATTRIBUTE-DEFINITION-DATE"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION" type="REQIF:ATTRIBUTE-DEFINITION-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER" type="REQIF:ATTRIBUTE-DEFINITION-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL" type="REQIF:ATTRIBUTE-DEFINITION-REAL"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING" type="REQIF:ATTRIBUTE-DEFINITION-STRING"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML" type="REQIF:ATTRIBUTE-DEFINITION-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPEC-RELATION">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="VALUES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-BOOLEAN" type="REQIF:ATTRIBUTE-VALUE-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-VALUE-DATE" type="REQIF:ATTRIBUTE-VALUE-DATE"/>
+            <xsd:element name="ATTRIBUTE-VALUE-ENUMERATION" type="REQIF:ATTRIBUTE-VALUE-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-VALUE-INTEGER" type="REQIF:ATTRIBUTE-VALUE-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-VALUE-REAL" type="REQIF:ATTRIBUTE-VALUE-REAL"/>
+            <xsd:element name="ATTRIBUTE-VALUE-STRING" type="REQIF:ATTRIBUTE-VALUE-STRING"/>
+            <xsd:element name="ATTRIBUTE-VALUE-XHTML" type="REQIF:ATTRIBUTE-VALUE-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="SOURCE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPEC-OBJECT-REF" type="REQIF:GLOBAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TARGET">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPEC-OBJECT-REF" type="REQIF:GLOBAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPEC-RELATION-TYPE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPEC-RELATION-TYPE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-ATTRIBUTES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN" type="REQIF:ATTRIBUTE-DEFINITION-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE" type="REQIF:ATTRIBUTE-DEFINITION-DATE"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION" type="REQIF:ATTRIBUTE-DEFINITION-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER" type="REQIF:ATTRIBUTE-DEFINITION-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL" type="REQIF:ATTRIBUTE-DEFINITION-REAL"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING" type="REQIF:ATTRIBUTE-DEFINITION-STRING"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML" type="REQIF:ATTRIBUTE-DEFINITION-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPECIFICATION">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="VALUES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-VALUE-BOOLEAN" type="REQIF:ATTRIBUTE-VALUE-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-VALUE-DATE" type="REQIF:ATTRIBUTE-VALUE-DATE"/>
+            <xsd:element name="ATTRIBUTE-VALUE-ENUMERATION" type="REQIF:ATTRIBUTE-VALUE-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-VALUE-INTEGER" type="REQIF:ATTRIBUTE-VALUE-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-VALUE-REAL" type="REQIF:ATTRIBUTE-VALUE-REAL"/>
+            <xsd:element name="ATTRIBUTE-VALUE-STRING" type="REQIF:ATTRIBUTE-VALUE-STRING"/>
+            <xsd:element name="ATTRIBUTE-VALUE-XHTML" type="REQIF:ATTRIBUTE-VALUE-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="CHILDREN">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="SPEC-HIERARCHY" type="REQIF:SPEC-HIERARCHY"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="1" name="TYPE">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="1">
+            <xsd:element name="SPECIFICATION-TYPE-REF" type="REQIF:LOCAL-REF"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="SPECIFICATION-TYPE">
+    <xsd:all>
+      <xsd:element maxOccurs="1" minOccurs="0" name="ALTERNATIVE-ID">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="ALTERNATIVE-ID" type="REQIF:ALTERNATIVE-ID"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element maxOccurs="1" minOccurs="0" name="SPEC-ATTRIBUTES">
+        <xsd:complexType>
+          <xsd:choice maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="ATTRIBUTE-DEFINITION-BOOLEAN" type="REQIF:ATTRIBUTE-DEFINITION-BOOLEAN"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-DATE" type="REQIF:ATTRIBUTE-DEFINITION-DATE"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-ENUMERATION" type="REQIF:ATTRIBUTE-DEFINITION-ENUMERATION"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-INTEGER" type="REQIF:ATTRIBUTE-DEFINITION-INTEGER"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-REAL" type="REQIF:ATTRIBUTE-DEFINITION-REAL"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-STRING" type="REQIF:ATTRIBUTE-DEFINITION-STRING"/>
+            <xsd:element name="ATTRIBUTE-DEFINITION-XHTML" type="REQIF:ATTRIBUTE-DEFINITION-XHTML"/>
+          </xsd:choice>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:all>
+    <xsd:attribute name="DESC" type="xsd:string" use="optional"/>
+    <xsd:attribute name="IDENTIFIER" type="xsd:ID" use="required"/>
+    <xsd:attribute name="LAST-CHANGE" type="xsd:dateTime" use="required"/>
+    <xsd:attribute name="LONG-NAME" type="xsd:string" use="optional"/>
+  </xsd:complexType>
+  <xsd:complexType name="REQ-IF-TOOL-EXTENSION">
+    <xsd:sequence>
+      <xsd:any namespace="##other" processContents="lax" maxOccurs="unbounded" minOccurs="0"/>
+    </xsd:sequence>
+  </xsd:complexType>
+  <xsd:complexType name="XHTML-CONTENT">
+    <xsd:group ref="xhtml.BlkStruct.class"/>
+  </xsd:complexType>
+</xsd:schema>
\ No newline at end of file
index c2ed284ab342b78af2121225a01403994ecb6e09..c4d0fa09d84df75a17029918d1ee8aca52a968ca 100644 (file)
--- a/reqif.cpp
+++ b/reqif.cpp
 
 void parse(const std::string &file)
 {
+    reqif::Element root_Elt;
     std::cout<<"Build Parser"<<std::endl;
     //xml::reqif::ReqifParser  project_parser(&m_Project,&m_Project);
-    xml::reqif::ReqifParser  project_parser(nullptr,nullptr);
-    xml::reqif::Document doc(project_parser,"project");
+    xml::reqif::ReqifParser  project_parser(nullptr,&root_Elt);
+    xml::reqif::Document doc(project_parser,"REQ-IF");
 
     std::ifstream bf(file);
     if (bf.is_open())
@@ -44,4 +45,11 @@ void parse(const std::string &file)
 int main(int argc,char **argv)
 {
   std::cout<<"Hello world ReqIf Parsing"<<std::endl;
+  if (argc > 1)
+  {
+    std::string fn(argv[1]);
+    std::cout<<"  Try parsing "<<fn<<std::endl;
+    parse(fn);
+
+  }
 }
index 279c8739e86d346a62334f15b9fa4ac57b6ab188..930e633a6da32144907d38d79172df64de82d4e8 100644 (file)
@@ -16,8 +16,8 @@ set(PLIB_GEN_SRCS "")
 
 if(ANTCC_USE_LEMON)
   RAGELGEN(SOURCE reference_lexer.ragel OUTPUT ref_l.cpp)
-  LEMONGEN(SOURCE reference.lemon OUTPUT reference.c)
-  list(APPEND PLIB_GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/reference.c)
+  LEMONGEN(SOURCE reference.lemon OUTPUT reference.cpp)
+  list(APPEND PLIB_GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/reference.cpp)
   list(APPEND PLIB_GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/ref_l.cpp)
 else()
   FLEXGEN(SOURCE reference.l OUTPUT ref_l.cpp OPTS -R )
@@ -42,8 +42,8 @@ ADD_EXECUTABLE(test_prop_parser
 )
 # Mainly for lemon. It generates a C file that must be compile with C++
 if(WIN32)
-target_compile_options(propertylib PRIVATE /Tp)
-target_compile_options(test_prop_parser PRIVATE /Tp)
+target_compile_options(propertylib PRIVATE /TP)
+target_compile_options(test_prop_parser PRIVATE /TP)
 endif()
 
 TARGET_LINK_LIBRARIES(test_prop_parser libantcc_parser libantcc_cond libantcc ${EXPAT_LIBRARY})
index 9941c259fcc62209cacae9012663ee35a1f9fe05..935f77eb4f913308af8a7bae722dfb58ef75e4b1 100644 (file)
@@ -9,6 +9,15 @@
 #include <algorithm>
 #include <utility>
 
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -45,7 +54,7 @@
 
 %syntax_error {
        printf("Syntax Error! Suggested tokens:\n");
-       const YYACTIONTYPE stateno = yytos->stateno;
+       const YYACTIONTYPE stateno = yypParser->yytos->stateno;
        for (unsigned i = 0; i < YYNTOKEN; ++i) {
                int yyact = yy_find_shift_action(i, stateno);
                if (yyact != YY_ERROR_ACTION && yyact != YY_NO_ACTION) {
@@ -64,16 +73,23 @@ std::unique_ptr<reference_parser> reference_parser::create() {
 }
 
 
-%token_type {Token &&}
-%type function { antcc::condition::ICondition }
-%type phrase   { antcc:condition::ICondition::Result *}
-
+%token_type {Token }
+%type function { antcc::condition::ICondition *}
+%type function_if { antcc::condition::ICondition *}
+%type function_not { antcc::condition::ICondition *}
+%type function_or { antcc::condition::ICondition *}
+%type function_and { antcc::condition::ICondition *}
+%type function_isset { antcc::condition::ICondition *}
+%type function_filter { antcc::condition::ICondition *}
+%type function_filter_out { antcc::condition::ICondition *}
+%type value    { Token}
+%type parameters { std::vector<std::string> }
 
 value ::= . /* empty */ 
     
 value ::= phrase(F). {
-        p->setResult(*F);
-        delete F;
+        //p->setResult(*F);
+        //delete F;
     }
 
 value ::= function(F).  {
@@ -85,76 +101,149 @@ value ::= function(F).  {
             std::cout<<"TODO function no:"<<_result.m_Str<<std::endl;
 
         }
-        p->setResult("");
+        //p->setResult("");
     }
 
+/* Phrase rules */
 
 phrase(T)::=.
 
-phrase(LH) ::= phrase(RH) chaine(STR).
-phrase(LH) ::= phrase(RH) SPACE.
-phrase(LH) ::= phrase(RH) global_reference(R).
-phrase(LH) ::= phrase(RH) local_reference(R).
+phrase(LH) ::= phrase(RH) chaine(STR). {
+  RH.stringValue.append(STR.stringValue);
+  LH = std::move(RH);
+}
+phrase(LH) ::= phrase(RH) SPACE. {
+  LH = std::move(RH);
+}
+phrase(LH) ::= phrase(RH) global_reference(R). {
+  LH = std::move(RH);
+}
+phrase(LH) ::= phrase(RH) local_reference(R). {
+  LH = std::move(RH);
+}
 
-global_reference(LH) ::= GLOBAL_REF_BEGIN fragment(F) REF_END.
+global_reference(LH) ::= GLOBAL_REF_BEGIN fragment(F) REF_END.  {
+         //p->lookup(*$2,_result);
+         //*$2 = _result;
+         LH = std::move(std::string(""));
+}
 
-local_reference(LH) ::= LOCAL_REF_BEGIN fragment(F) REF_END.
+local_reference(LH) ::= LOCAL_REF_BEGIN fragment(F) REF_END.  {
+  LH = std::move(F);
+}
 
 
-fragment(LH) ::= chaine(RH).
+fragment(LH) ::= chaine(RH).  { 
+  LH = std::move(RH);
+}
 
-fragment(LH) ::= SPACE.
+fragment(LH) ::= SPACE. { 
+  LH = std::move(std::string(""));
+}
 
-fragment(LH) ::= chaine(CH) global_reference(GR).
-fragment(LH) ::= global_reference(GR) chaine(CH).
-fragment(LH) ::= local_reference(GR) chaine(CH).
-fragment(LH) ::= fragment(RH) chaine(CH).
-fragment(LH) ::= fragment(RH) SPACE.
-fragment(LH) ::= fragment(RH) global_reference(GR).
-fragment(LH) ::= fragment(RH) local_reference(LR).
+fragment(LH) ::= chaine(CH) global_reference(GR). {
+  CH.stringValue.append(GR.stringValue);
+  LH = std::move(CH);
+}
+fragment(LH) ::= global_reference(GR) chaine(CH). {
+  GR.stringValue.append(CH.stringValue);
+  LH = std::move(GR);
+}
+fragment(LH) ::= local_reference(GR) chaine(CH). {
+  GR.stringValue.append(CH.stringValue);
+  LH = std::move(GR);
+}
+fragment(LH) ::= fragment(RH) chaine(CH). {
+  RH.stringValue.append(CH.stringValue);
+  LH = std::move(RH);
+}
+fragment(LH) ::= fragment(RH) SPACE. {
+  LH = std::move(RH);
+}
+fragment(LH) ::= fragment(RH) global_reference(GR). {
+  RH.stringValue.append(GR.stringValue);
+  LH = std::move(RH);
+}
+fragment(LH) ::= fragment(RH) local_reference(LR). {
+  RH.stringValue.append(LR.stringValue);
+  LH = std::move(RH);
+}
 
-fragment(LH) ::= global_reference(GR).
-fragment(LH) ::= local_reference(LR).
+fragment(LH) ::= global_reference(GR). {
+  LH = std::move(GR);
+}
+fragment(LH) ::= local_reference(LR). {
+  LH = std::move(LR);
+}
 
 
 function(LF)  ::= function_if(RF).
+{ LF = RF ; }
 function(LF)  ::= function_not(RF).
+{ LF = RF ; }
 function(LF)  ::= function_or(RF).
+{ LF = RF ; }
 function(LF)  ::= function_and(RF).
+{ LF = RF ; }
 function(LF)  ::= function_isset(RF).
+{ LF = RF ; }
 function(LF)  ::= function_filter(RF).
+{ LF =RF ; }
 function(LF)  ::= function_filter_out(RF).
+{ LF = RF ; }
 
 function_if(LF) ::= IF three_parameters(PARAM) REF_END.
+{ LF = NULL;}
 
 function_isset(LF) ::= ISSET parameter(PARAM) REF_END.
+{ LF = NULL;}
 
-function_not(LF) ::= NOT function(RFF) REF_END.
+function_not(LF) ::= NOT function(RFF) REF_END. {
+        antcc::condition::condition_not *_cond = new
+            antcc::condition::condition_not(RFF);
+        LF = _cond;
+}
 
 function_or(LF) ::= OR parameters(PARAM) REF_END.
+{ LF = NULL;}
 
 function_and(LF) ::= AND parameters(PARAM) REF_END.
+{ LF = NULL;}
 
 function_filter(LF) ::= FILTER three_parameters(PARAM) REF_END.
+{ LF = NULL;}
+function_filter_out(LF) ::= FILTER_OUT three_parameters(PARAM) REF_END. {
+  LF = NULL;
+}
 
-function_filter_out(LF) ::= FILTER_OUT three_parameters(PARAM) REF_END.
 
+parameter(LP) ::= global_reference(RH). {
+  LP = std::move(RH);
+}
+parameter(LP) ::= local_reference(RH). {
+  LP = std::move(RH);
+}
 
-parameter(LP) ::= global_reference(RH).
-parameter(LP) ::= local_reference(RH).
+parameter(LP) ::= chaine(CH). {
+  LP = CH;
+}
 
-parameter(LP) ::= chaine(CH).
+parameters(LH) ::= parameter(RH). {
+   LH.push_back(RH.stringValue); 
+}
 
-parameters(LH) ::= parameter(RH).
-parameters(LH) ::= parameters(RH) VIRGULE parameter(RP).
+parameters(LH) ::= parameters(RH) VIRGULE parameter(RP). {
+  RH.push_back(RP.stringValue);
+  LH = RH;
+}
 
 three_parameters(LH) ::= parameter VIRGULE parameter VIRGULE parameter.
 
 
 chaine(RH)::= CHAINE(T). {
-  RH = T;
+  RH = std::move(T);
 }
 chaine(RH)::= WORD(T). {
-  RH = T;
+  RH = std::move(T);
 }
 
index 4c003013958d74fe74af05de8c6f187af603d886..28c8791276de4d833983d852d8788038fd1d93f1 100644 (file)
@@ -10,7 +10,7 @@ struct Token {
        Token() = default;
        Token(const Token &) = default;
        Token(Token &&) = default;
-
+        virtual ~Token() {} ;
        Token(int i) : intValue(i)
        {}
        Token(const std::string &s) : stringValue(s)
@@ -19,7 +19,8 @@ struct Token {
        {}
 
 
-       Token& operator=(const Token &) = default;
+       //Token& operator=(const Token &) = default;
+       Token& operator=(const Token &t) {intValue = t.intValue; stringValue = t.stringValue;  return *this;};
        Token& operator=(Token &&) = default;
 
        int intValue = 0;
index afe289dde71220747b2b96338df0aa7d2eac8234..a49a005f4bd19b54109e0f5240227c5c505fbab0 100644 (file)
@@ -30,7 +30,7 @@ namespace reqif {
             typedef typename xml::element_traits<Element>::element_type t_type;
             typedef typename xml::element_traits<Element>::element_sptr t_sptr;
             
-            Element(int _type ) : m_Name("") , m_Type(_type) {}
+            Element(int _type = eNone) : m_Name("") , m_Type(_type) {}
 
             Element(const Element &_e) : m_Name(_e.m_Name),m_Type(_e.m_Type)
             {}
index ea0d852422f712b69f4726cb51e2b98b21e8533d..eed7e4ad4431278ecd314f62e2ac1058b429d989 100644 (file)
@@ -578,7 +578,7 @@ ROOT_PARSER(ReqifParser,
 {
 if (name == "THE-HEADER" && ns.empty())
 {
-    s.m_parser = SHARED_PTR<TargetParser>(new TargetParser(m_Project
+    s.m_parser = SHARED_PTR<ReqifHeaderParser>(new ReqifHeaderParser(m_Project
                        , ::reqif::ElementFactory::get().orderElement(name.c_str())
                  ));
 } else if (name == "TOOL-EXTENSION" && ns.empty())
@@ -797,6 +797,30 @@ COMPLEX_PARSER(SpecObjectTypeParser,
     return l_ok;
   })
 
+// Spec Object Type Parser Implementation
+COMPLEX_PARSER(SpecAttributesParser,
+  { 
+    s.m_parser = SHARED_PTR<AttributeDefinitionParser>(new AttributeDefinitionParser(m_Project
+                           , ::reqif::ElementFactory::get().orderElement(name.c_str())
+                 ));
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("SpecAttributesParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("SpecAttributesParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
 
 // Macrodef Parser Implementation
 COMPLEX_PARSER(AttributeDefinitionParser,