<?xml
version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
version="1.0">
<xsl:output
encoding="utf-8"/>
<!--
match the root node -->
<xsl:
match="/">
<xsl:text>
</xsl:text>
<xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:template>
<!--
match everything else -->
<xsl:template
match="*|@*|text()|comment()|processing-instruction()">
<xsl:copy><xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/></xsl:copy>
</xsl:template>
<!--
the element 'materials' as group -->
<xsl:element name="{local-name(.)}">
<xsl:attribute
name="rwt:group"
namespace = "RC-WinTrans">Materials </xsl:attribute>
<xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:element>
</xsl:template>
<!--
the element 'material - make a group and translate the 'name' attribute
-->
<xsl:template
match="material">
<xsl:element name="{local-name(.)}">
<xsl:attribute
name="rwt:group" namespace = "RC-WinTrans">
Material matid=<xsl:value-of select="@matid"/></xsl:attribute>
<xsl:attribute
name="rwt:attributeTU_name"
namespace = "RC-WinTrans"></xsl:attribute>
<xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:element>
</xsl:template>
<!--
'EX' element - set the 'displayname' and 'descr' attributes as translatable
-->
<xsl:template
match="EX">
<xsl:element name="{local-name(.)}">
<xsl:attribute
name="rwt:attributeTU_displayname"
namespace = "RC-WinTrans"></xsl:attribute>
<xsl:attribute
name="rwt:attributeTU_desc"
namespace = "RC-WinTrans"></xsl:attribute>
<xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:element>
</xsl:template>
<!--
'DENS' element - set the 'displayname' attribute as translatable -->
<xsl:template
match="DENS">
<xsl:element name="{local-name(.)}">
<xsl:attribute
name="rwt:attributeTU_displayname"
namespace = "RC-WinTrans"> </xsl:attribute>
<xsl:apply-templates
select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet> |