File: Data.xml
<?xml version="1.0"?>
<employees>
<animal>
<name language="English">T1</name>
<name language="Latin">T2</name>
<projects>
<project>project1</project>
</projects>
</animal>
</employees>
File: Transform.xslt
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="animal">
<xsl:apply-templates select="name" />
</xsl:template>
<xsl:template match="name[@language='English']">
<nobr>
<b>
<xsl:value-of select="." />
:
</b>
</nobr>
</xsl:template>
</xsl:stylesheet>
Output:
<?xml version="1.0" encoding="UTF-8"?>
<nobr><b>T1
:
</b></nobr>T2
|