El problema es combinar y ordenar varias archivos XML con XSL y la salida HTML válido se puede leer con Firefox> = 3.5 y si es posible IE> = 7. La respuesta debe ser lo más simple posible (el rendimiento no es importante).Combinar y clasificar varios archivos XML con XSL
a.xml Archivo
<?xml version="1.0"?>
<root>
<tag>cc</tag>
<tag>aa</tag>
</root>
b.xml Archivo
<?xml version="1.0"?>
<root>
<tag>xx</tag>
<tag>bb</tag>
</root>
index.xml Archivo
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="merge.xslt"?>
<list>
<entry>a.xml</entry>
<entry>b.xml</entry>
</list>
merge.xslt Archivo
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ph="http://ananas.org/2003/tips/photo">
<xsl:output method="html"/>
<xsl:template match="list">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="entry">
<xsl:for-each select="document(.)/root/tag">
<!-- This will only sort the values of a single file -->
<xsl:sort select="." data-type="text" order="ascending" />
- <xsl:value-of select="."/> <br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Salida de corriente:
aa
cc
bb
xx
Resultados previstos:
aa
bb
cc
xx
Buena pregunta, +1. Vea mi respuesta para una solución completa, muy corta y fácil que no tiene las complejidades de ninguna de las otras respuestas: sin funciones de extensión, sin variables, sin 'xsl: for-each' ... –
También se agregó una explicación extensa. –