1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<!-- Match root of document -->
<xsl:template match="/">
<!-- Create one document by translation, so iterates on translation -->
<xsl:for-each select="//translations/*">
<xsl:result-document href="{@output}">
<xsl:variable name="ref">http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd</xsl:variable>
<beans>
<xsl:attribute name="xsi:schemaLocation"><xsl:value-of select="$ref"/></xsl:attribute>
<!-- Root element can be either window, moduleBar or module -->
<!-- Search window, with name of translation as parameter -->
<xsl:apply-templates select="/uidl/window">
<xsl:with-param name="doc" select="."/>
</xsl:apply-templates>
</beans>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
<xsl:template match="window">
<!-- Des trucs... --> |