File: Data.xml
<data grape="A">
<winery year="1998">B</winery>
</data>
File: Transform.xslt
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="winery">
<wine>
<xsl:value-of select="@year" />
<xsl:text/>
<xsl:value-of select="../@grape" />
</wine>
</xsl:template>
</xsl:stylesheet>
Output:
<wine>1998A</wine>
|