Solution Exercise 2b) solex2b.xsl (solex2b.xsl.txt), its input as XML 'main' document: solex2b-main.xml (solex2b-main.xml.txt), its processing result as XML 'output' document: solex2b-main.xml-out (solex2b-main.xml-out.txt).
Solution Exercise 2c) NO irrecoverable information loss in either direction. When applying the b) template to the result of applying the a) template to the 'flat-address' form, the 'flat-address' form is obtained again (identity transformation).
Solution Exercise 2d) Both are 'match' templates. In neither case would 'named' templates work since these cannot be iteratively positioned at all the address elements within addresses (via xsl:apply-templates).
Solution Exercise 2e) From this solex2e.bat Relfun produces this solex2e.script.