Erzeugen von Methoden
Stylesheet:
<xsl:template
match="/Foo">
public class <xsl:value-of
select="classname"/> {
<xsl:apply-templates/>
}
</xsl:template>
<xsl:template
match="*">
public String
get<xsl:value-of select="name()"/>() {
return "<xsl:value-of
select="."/>";
}
</xsl:template>
Erzeugter Code:
public class Foo {
public String getclassname() {
return "Bar";
}
public String getmessage() {
return "Hossale";
}
}