I'm trying to get my head around putting XLIFF's segmented source/target language elements side by side in an HTML table, like
<trans-unit id="/html[1]/head[1]/title[1]" resname="Title">
<source xml:lang="de-DE">E-Mail: Vorlagen</source>
<seg-source>
<mrk mid="1" mtype="seg">E-Mail: Vorlagen</mrk>
<mrk mid="2" mtype="seg">Vorlagen</mrk>
</seg-source>
<target state="translated">
<mrk mid="1" mtype="seg">Email:</mrk>
<mrk mid="2" mtype="seg">Templates</mrk>
</target>
</trans-unit>
should become
<tr>
<td class="mid">1</td> <td class="src">E-Mail:</td> <td class="tgt">Email:<td/>
</tr>
<tr>
<td class="mid">2</td> <td class="src">Vorlagen</td> <td class="tgt">Templates<td/>
</tr>
XLIFF translation units can have any number of sub-segments, it thus must be a solution that, I don't know, counts how many MIDs there are in a TU and then jumps back and forth between the source-segment and target elements (with an incremental counter?) to put them side by side in the table?
I have seen XSLT 2.0 solutions working with "for-each-group" wizardry, but did not yet get an idea of how to do it in XSLT 1.0 (edit: with Xalan 1.11). Frankly, I'm a bit amazed that no one has whipped up a style sheet to show bilingual translations in XLIFF side by side as HTML table, so I thought I'd give it a try. Unfortunately, my XSLT hasn't been used in, like, years and I'm a bit rusty. Any pointers what keyword/topic/web source I should have a look at, if not a straight solution?
Thanks a lot, Christopher
P.S.: If I can work out a solution, I'll, of course, put it freely online for my fellow translator colleagues (or anyone who wants to get a look at what actually is these XLIFF files they send out to us translators).
Somehow along the following lines: