XSLT1.0 Secuencia de representación de diferentes elementos almacenados en una variable como tabla M x N
Tengo el siguiente XML (se simplifica y se omiten la mayoría de los atributos):
<Document>
<Transfer Name="" From="" To=""/>
<Transfer Name="" From="" To=""/>
<OtherElement/>
<OtherElement/>
<Flight AirLina="" From="" To=""/>
<Flight AirLina="" From="" To=""/>
<OtherElement/>
<Hotel Name="" Duration=""/>
<Hotel Name="" Duration=""/>
<OtherElement/>
<OtherElement/>
<Extras Name="" Price=""/>
<Extras Name="" Price=""/>
<Extras Name="" Price=""/>
<Extras Name="" Price=""/>
<Extras Name="" Price=""/>
<Extras Name="" Price=""/>
<OtherElement/>
<OtherElement/>
</Document>
Tengo una variable que contiene diferentes elementos:
<xsl:variable name="packageElements"
select="/Document/Transfer | /Document/Coach | /Document/Flight | /Document/Hotel | /Document/Extras" />
Me gustaría mostrar esos datos en una tabla con 2 columnas. Estoy usando el procesador XSLT1.0 y MSXSL.
Lo he estado probando con la solución más simple que se me ocurrió:
<table>
<tbody>
<xsl:for-each select="$packageElements[position() mod 2 = 1]">
<tr>
<td>
<!-- current element -->
<xsl:value-of select="local-name()"/>
</td>
<td>
<!-- element following the current in the $packageElements variable -->
<!-- Here is where I'm stuck, I can't figure out how to correctly pick it up :( -->
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
Realmente agradecería cualquier ayuda.