I'm trying to transform one XML document (REQ-IF) into another XML document (UML-Class-Diagram document) using XSLT.
My Problem now is the following:
REQ-IF provides datatypes as:
<Datatypes>
<DATATYPE-DEFINITION-STRING IDENTIFIER="xyz" LONG-NAME="ABC"
</Datatypes>
and Objects as:
<SPEC-OBJECTS>
<VALUES>
<ATTRIBUTE-VALUE-STRING THE-VALUE="some-value">
<DEFINITION>
<ATTRIBUTE-DEFINITION-STRING-REF>xyz</ATTRIBUTE-DEFINITION-STRING-REF>
</DEFINITION>
</ATTRIBUTE-VALUE-STRING>
</VALUES
<SPEC-OBJECTS>
This is resembled in my UML representation as:
<ownedAttribute xmi:id="some-ID" name="ABC" type="some-ID">
please note the ABC and xyz.
I therefore use <xsl:for-each> to loop through the Objects and another <xsl:for-each> to loop through the values. Now I have to take the Datatype-ID from the value, find out which Datatype it is and write the Datatype-name into the output file. How do I do that?
Thank you so much in advance