SystemWeaver builds on a configurable meta model where the information can be tailored to fit the process and methods that a company uses. With regards to ReqIF, this means that every customer configures their own exports based on the data that they have. This article describes how you can export ReqIF files using the built-in XML generator in SystemWeaver. 

Prerequisites

For testing purposes:


Things to Consider

 Below are points to be aware of when exporting to ReqIF and importing into another system.

  • ReqIF is for the export of requirements (and requirements structure) only. It does not export other items, such as components, ports, etc. 
  • Similarly, a generated document/PDF output of a particular item structure that includes requirements together with other item types will differ from a ReqIF export of the same item structure since the export will only include requirements, whereas the document may include the other types of items. 
  • If there are issues with an import of a ReqIF file generated from SystemWeaver into a different system, it may be that the target database is unable to import ReqIF. If this should be the case, there are third-party applications that many companies use to convert files so that they can be successfully imported.
  • For picture content, the supported image types are currently jpeg and png. Note that images may grow in size slightly when exported. 

Configuring the XML

ReqIF files are XML files that have the following structure:

  1. Header: Contains information related to the author, a title, and the version of the XML document.
  2. Datatypes: Specifies the basic data types used, e.g., Integer, Real, Date, String, plain text, formatted text in XHTML
  3. Specification types: Specifies types of information that will be of interest in the exported RIF. In our case, requirements and requirements sections with their titles, descriptions, and relevant attributes.
  4. Specification objects: A list with all objects and their descriptions.
  5. Specification hierarchy: The structure of objects.

We generate the ReqIf files using our configurable Script Language in SystemWeaver. 

  1. Open the main document (in our example, Document 1, xID: x040000000000002A) in the database. As you can see in the example, the document contains a number of sections and requirements in a layered structure.
  2. In the View drop-down menu, select XMLs > Sandbox to create a new configurable XML. An XML example is provided at the bottom of this article and demonstrates how we traverse the data to create the ReqIF file.
  3. In the top part of the file, create a context for the document and the contained sections and requirements <Context>. 

  4. Then, add templates to create the header (CreateHeader) and the data types (CreateDataTypes). We recommend that you copy and paste these two templates as they are used in any database.

  5. The remaining templates shown in the example are concerned with creating specification types (CreateSpecObjectType) and specification objects. For specification objects, we use the templates SPEC-OBJECTS and CreateSpecObjectAttributes (the latter to create attributes for specification objects). To create the specification hierarchy, the templates CreateSpecificationHierarchy, SPEC-HIERARCHY-IRRS, and SPEC-HIERARCHY-IRSI are used.

  6. The last lines of the XML, use<ApplyTemplate> tags to call the different templates you have named and create the remaining elements required by the XML.


Example XML

<XDocument name="REQ-IF">
  <XDefaultNamespace uri="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"/>
  <XAttribute name="xmlns:xsi" value="http://www.w3.org/2001/XMLSchema-instance"/>
  <XAttribute name="xmlns:xhtml" value="http://www.w3.org/1999/xhtml"/>
  <XAttribute name="xsi:schemaLocation" value="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd reqif.xsd"/>
  <Options>
    <Suffix>reqif</Suffix>
  </Options>
  <Context name="SSRP">
    <AddParts owner="main" sid="IRRS" part="Section" defobj="+Sections"/>
    <AddParts owner="Sections" sid="ISSE" part="Section" defobj="+Sections"/>
    <AddParts owner="Sections" sid="IRSI" part="SectionItem" defobj="+Reqs"/>
  </Context>
  <ApplyTemplate name="CreateHeader"/>
  <XElement name="CORE-CONTENT">
    <XElement name="REQ-IF-CONTENT">
      <ApplyTemplate name="CreateDataTypes"/>
      <XElement name="SPEC-TYPES">        
        <ApplyTemplate name="CreateSpecObjectType">
          <WithParam name="itemType" select="'X_SSSE'"/>
          <WithParam name="itemName" select="'Section'"/>
        </ApplyTemplate>
        <ApplyTemplate name="CreateSpecObjectType">
          <WithParam name="itemType" select="'X_RQ'"/>
          <WithParam name="itemName" select="'Requirement'"/>
        </ApplyTemplate>
          <ApplyTemplate name="CreateSpecificationType">
          <WithParam name="itemType" select="'X_SSRP'"/>
          <WithParam name="itemName" select="'Document'"/>
        </ApplyTemplate>                               
        <!--ApplyTemplate name="CreateSpecRelationType">
          <WithParam name="partType" select="'X_SPET'"/>
          <WithParam name="partName" select="'SpecRelationPartName'"/>
        </ApplyTemplate-->
      </XElement>
      <ApplyTemplate name="SPEC-OBJECTS"/>  
       <ApplyTemplate name="SPEC-RELATIONS"/>
      <ApplyTemplate name="CreateSpecificationHierarchy"/>
    </XElement>
  </XElement>
  <Template name="CreateHeader">
    <XElement name="THE-HEADER">
      <XElement name="REQ-IF-HEADER">
        <XAttribute name="IDENTIFIER" value="RootItem_#{AncestorHandle}"/>
        <XElement name="CREATION-TIME">
          <Text>#{?Now.Format('utc')}</Text>
        </XElement>
        <XElement name="REQ-IF-TOOL-ID">
          <Text>SystemWeaver</Text>
        </XElement>
        <XElement name="REQ-IF-VERSION">
          <Text>1.2</Text>
        </XElement>
        <XElement name="SOURCE-TOOL-ID">
          <Text>SystemWeaver</Text>
        </XElement>
        <XElement name="TITLE">
          <Text>Export of: #{Name} #{Version} #{Handle}</Text>
        </XElement>
      </XElement>
    </XElement>
  </Template>
  <Template name="CreateDataTypes">
    <XElement name="DATATYPES">
      <XElement name="DATATYPE-DEFINITION-INTEGER">
        <XAttribute name="IDENTIFIER" value="ID_SW_IntegerType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="Integer"/>
        <XAttribute name="MAX" value="2147483647"/>
        <XAttribute name="MIN" value="-2147483648"/>
      </XElement>
      <XElement name="DATATYPE-DEFINITION-REAL">
        <XAttribute name="IDENTIFIER" value="ID_SW_FloatType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="Float"/>
        <XAttribute name="MAX" value="3.4028e+38"/>
        <XAttribute name="MIN" value="-3.4028e+38"/>
        <XAttribute name="ACCURACY" value="9"/>
      </XElement>
      <XElement name="DATATYPE-DEFINITION-DATE">
        <XAttribute name="IDENTIFIER" value="ID_SW_DateType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="Date"/>
      </XElement>
      <XElement name="DATATYPE-DEFINITION-STRING">
        <XAttribute name="IDENTIFIER" value="ID_SW_StringType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="String"/>
        <XAttribute name="MAX-LENGTH" value="1028"/>
      </XElement>
      <XElement name="DATATYPE-DEFINITION-XHTML">
        <XAttribute name="IDENTIFIER" value="ID_SW_XhtmlTextType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="Plain text"/>
      </XElement>
      <XElement name="DATATYPE-DEFINITION-XHTML">
        <XAttribute name="IDENTIFIER" value="ID_SW_XhtmlFormatType"/>
        <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
        <XAttribute name="LONG-NAME" value="Formatted text"/>
      </XElement>
    </XElement>
  </Template>
  <Template name="CreateSpecObjectType">
    <!--Parameters-->
    <Parameter name="itemType" as="String"/>
    <Parameter name="itemName" as="String"/>
    <!--/Parameters-->
    <XElement name="SPEC-OBJECT-TYPE">
      <XAttribute name="IDENTIFIER" value="#{?$itemType}"/>
      <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
      <XAttribute name="LONG-NAME" value="#{?$itemName}"/>
      <XElement name="SPEC-ATTRIBUTES">
        <XElement name="ATTRIBUTE-DEFINITION-XHTML">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.ObjectText"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Object Text"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-XHTML-REF">
              <Text>ID_SW_XhtmlFormatType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.ObjectHeading"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Object Heading"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.Status"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Status"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionNumber"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionNumber"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionText"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionText"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionID"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionID"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <If test="$itemType = 'X_RQ'">
          <XElement name="ATTRIBUTE-DEFINITION-INTEGER">
            <XAttribute name="IDENTIFIER" value="#{?$itemType}.Priority"/>
            <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
            <XAttribute name="LONG-NAME" value="Priority"/>
            <XElement name="TYPE">
              <XElement name="DATATYPE-DEFINITION-INTEGER-REF">
                <Text>ID_SW_IntegerType</Text>
              </XElement>
            </XElement>
          </XElement>
          <XElement name="ATTRIBUTE-DEFINITION-STRING">
            <XAttribute name="IDENTIFIER" value="#{?$itemType}.VerificationMethod"/>
            <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
            <XAttribute name="LONG-NAME" value="VerificationMethod"/>
            <XElement name="TYPE">
              <XElement name="DATATYPE-DEFINITION-STRING-REF">
                <Text>ID_SW_StringType</Text>
              </XElement>
            </XElement>
          </XElement>
        </If>
      </XElement>
    </XElement>
  </Template>
  <Template name="CreateSpecObjectAttributes">
    <XElement name="ATTRIBUTE-VALUE-XHTML">
      <XElement name="THE-VALUE">
        <XElement name="xhtml:div">
          <Extension name="xhtmlDescription"/>
        </XElement>
      </XElement>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-XHTML-REF">
          <Text>X_#{Type.SID}.ObjectText</Text>
        </XElement>
      </XElement>
    </XElement>
    <XElement name="ATTRIBUTE-VALUE-STRING">
      <XAttribute name="THE-VALUE" value="#{Name}"/>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
          <Text>X_#{Type.SID}.ObjectHeading</Text>
        </XElement>
      </XElement>
    </XElement>
    <XElement name="ATTRIBUTE-VALUE-STRING">
      <XAttribute name="THE-VALUE" value="#{Handle}"/>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
          <Text>X_#{Type.SID}.VersionID</Text>
        </XElement>
      </XElement>
    </XElement>
    <XElement name="ATTRIBUTE-VALUE-STRING">
      <XAttribute name="THE-VALUE" value="#{Status}"/>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
          <Text>X_#{Type.SID}.Status</Text>
        </XElement>
      </XElement>
    </XElement>
    <XElement name="ATTRIBUTE-VALUE-STRING">
      <XAttribute name="THE-VALUE" value="#{VersionNumber}"/>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
          <Text>X_#{Type.SID}.VersionNumber</Text>
        </XElement>
      </XElement>
    </XElement>
    <XElement name="ATTRIBUTE-VALUE-STRING">
      <XAttribute name="THE-VALUE" value="#{VersionText}"/>
      <XElement name="DEFINITION">
        <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
          <Text>X_#{Type.SID}.VersionText</Text>
        </XElement>
      </XElement>
    </XElement>
    <!--Requirements have two special attributes: Priority and VerificationMethod-->
    <If test="Type.SID = 'RQ'">
      <If test="not @PRIO.ToString =''">
        <XElement name="ATTRIBUTE-VALUE-INTEGER">
          <XAttribute name="THE-VALUE" value="#{Attribute:PRIO}"/>
          <XElement name="DEFINITION">
            <XElement name="ATTRIBUTE-DEFINITION-INTEGER-REF">
              <Text>X_#{Type.SID}.Priority</Text>
            </XElement>
          </XElement>
        </XElement>
      </If>
      <XElement name="ATTRIBUTE-VALUE-STRING">
        <XAttribute name="THE-VALUE" value="#{Attribute:ABVM}"/>
        <XElement name="DEFINITION">
          <XElement name="ATTRIBUTE-DEFINITION-STRING-REF">
            <Text>X_#{Type.SID}.VerificationMethod</Text>
          </XElement>
        </XElement>
      </XElement>
    </If>
  </Template>
  <Template name="SPEC-OBJECTS">
    <XElement name="SPEC-OBJECTS">
      <ForEachInContext name="SSRP" group="main">
        <ForEach select="Context:/Section*/SectionItem*">
          <XElement name="SPEC-OBJECT">
            <XAttribute name="IDENTIFIER" value="#{AncestorHandle}"/>
            <XAttribute name="LAST-CHANGE" value="#{?LastChanged.Format('utc')}"/>
            <XAttribute name="LONG-NAME" value="#{Name}"/>
            <XElement name="VALUES">
              <ApplyTemplate name="CreateSpecObjectAttributes"/>
            </XElement>
            <XElement name="TYPE">
              <XElement name="SPEC-OBJECT-TYPE-REF">
                <Text>X_#{Type.SID}</Text>
              </XElement>
            </XElement>
          </XElement>
        </ForEach>
      </ForEachInContext>
    </XElement>
  </Template>
 <Template name="SPEC-RELATIONS">
  <XElement name="SPEC-RELATIONS">
            <ForEachInContext name="SSRP" group="Reqs">   
           <ContextGoForwardToPart part="SpeRelationThingPart"> 
          <XElement name="SPEC-RELATION">
            <XAttribute name="IDENTIFIER" value="#{AncestorHandle}"/>
            <XAttribute name="LAST-CHANGE" value="#{?DefObj.LastChanged.Format('utc')}"/>
            <XAttribute name="LONG-NAME" value="#{Name}"/>
            <!--XElement name="VALUES">
              <ApplyTemplate name="CreateSpecObjectAttributes"/>
            </XElement-->                                             
              <XElement name="SOURCE">
              <XElement name="SPEC-OBJECT-REF">
              <Text>#{Owner.Handle}</Text>
              </XElement>
              </XElement>
              <XElement name="TARGET">    
              <XElement name="SPEC-OBJECT-REF">
              <Text>#{DefObj.Handle}</Text>
              </XElement>
              </XElement>
            <XElement name="TYPE">
              <XElement name="SPEC-RELATION-TYPE-REF">
                <Text>X_#{Type.SID}</Text>
              </XElement>
            </XElement>
          </XElement>
        </ContextGoForwardToPart>
      </ForEachInContext>
      </XElement>
  </Template> 
 <Template name="CreateSpecificationHierarchy">
    <XElement name="SPECIFICATIONS">
      <XElement name="SPECIFICATION">
        <XAttribute name="IDENTIFIER" value="SPEC_#{AncestorHandle}"/>
        <XAttribute name="LAST-CHANGE" value="2015-03-31T16:33:20+02:00"/>
        <XAttribute name="LONG-NAME" value="#{Name}"/>
        <XElement name="TYPE">
          <XElement name="SPECIFICATION-TYPE-REF">
            <Text>X_#{Type.SID}</Text>
          </XElement>       
            <XElement name="VALUES">
              <ApplyTemplate name="CreateSpecObjectAttributes"/>
            </XElement>
        </XElement>
        <XElement name="CHILDREN">
          <ForEachPart type="IRRS">
            <ApplyTemplate name="SPEC-HIERARCHY"/>
          </ForEachPart>
        </XElement>
      </XElement>
    </XElement>
  </Template>  
    <Template name="CreateSpecificationType">
    <!--Parameters-->
    <Parameter name="itemType" as="String"/>
    <Parameter name="itemName" as="String"/>
    <!--/Parameters-->
    <XElement name="SPECIFICATION-TYPE">
      <XAttribute name="IDENTIFIER" value="#{?$itemType}"/>
      <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
      <XAttribute name="LONG-NAME" value="#{?$itemName}"/>
      <XElement name="SPEC-ATTRIBUTES">
        <XElement name="ATTRIBUTE-DEFINITION-XHTML">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.ObjectText"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Object Text"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-XHTML-REF">
              <Text>ID_SW_XhtmlFormatType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.ObjectHeading"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Object Heading"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.Status"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="Status"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionNumber"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionNumber"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionText"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionText"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <XElement name="ATTRIBUTE-DEFINITION-STRING">
          <XAttribute name="IDENTIFIER" value="#{?$itemType}.VersionID"/>
          <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
          <XAttribute name="LONG-NAME" value="VersionID"/>
          <XElement name="TYPE">
            <XElement name="DATATYPE-DEFINITION-STRING-REF">
              <Text>ID_SW_StringType</Text>
            </XElement>
          </XElement>
        </XElement>
        <If test="$itemType = 'X_RQ'">
          <XElement name="ATTRIBUTE-DEFINITION-INTEGER">
            <XAttribute name="IDENTIFIER" value="#{?$itemType}.Priority"/>
            <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
            <XAttribute name="LONG-NAME" value="Priority"/>
            <XElement name="TYPE">
              <XElement name="DATATYPE-DEFINITION-INTEGER-REF">
                <Text>ID_SW_IntegerType</Text>
              </XElement>
            </XElement>
          </XElement>
          <XElement name="ATTRIBUTE-DEFINITION-STRING">
            <XAttribute name="IDENTIFIER" value="#{?$itemType}.VerificationMethod"/>
            <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
            <XAttribute name="LONG-NAME" value="VerificationMethod"/>
            <XElement name="TYPE">
              <XElement name="DATATYPE-DEFINITION-STRING-REF">
                <Text>ID_SW_StringType</Text>
              </XElement>
            </XElement>
          </XElement>
        </If>
      </XElement>
    </XElement>
  </Template>                          
   <Template name="CreateSpecRelationType">
    <!--Parameters-->
    <Parameter name="partType" as="String"/>
    <Parameter name="partName" as="String"/>
    <!--/Parameters-->
    <XElement name="SPEC-RELATION-TYPE">
      <XAttribute name="IDENTIFIER" value="#{?$partType}"/>
      <XAttribute name="LAST-CHANGE" value="2018-10-09T15:55:00+01:00"/>
      <XAttribute name="LONG-NAME" value="#{?$partName}"/>         
      </XElement>    
  </Template>
  <Template name="SPEC-HIERARCHY">
    <XElement name="SPEC-HIERARCHY">
      <XAttribute name="IDENTIFIER" value="#{AncestorHandle}"/>
      <XAttribute name="LAST-CHANGE" value="#{?Now.Format('utc')}"/>
      <XElement name="OBJECT">
        <XElement name="SPEC-OBJECT-REF">
          <Text>#{DefObj.AncestorHandle}</Text>
        </XElement>
      </XElement>
      <DefObj>
        <If test="/ISSE or /IRSI">
          <XElement name="CHILDREN">
            <ForEachPart type="ISSE">
              <ApplyTemplate name="SPEC-HIERARCHY"/>
              <Log>IRRS</Log>
            </ForEachPart>
            <ForEachPart type="IRSI">
              <ApplyTemplate name="SPEC-HIERARCHY"/>
              <Log>IRSI</Log>
            </ForEachPart>
          </XElement>
        </If>
      </DefObj>
    </XElement>
  </Template>
</XDocument>

Viewing and Exporting

You can view the XML that you have created by switching to the View tab.

To save the ReqIF file, click the Save as… button.



What's Next?

You are now ready to import the ReqIF to other requirements management tools. See Things to Consider above, if you experience issues with the import. For our example, the imported data can look as shown below: