|
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:attribute-set name="default-table">
<xsl:attribute name="BORDER">0</xsl:attribute>
<xsl:attribute name="CELLSPACING">0</xsl:attribute>
<xsl:attribute name="CELLPADDING">0</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="aqua-table" use-attribute-sets="default-table">
<xsl:attribute name="BGCOLOR">AQUA</xsl:attribute>
<xsl:attribute name="BORDER">1</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Element: <xsl:element>
/ Beispiel 01</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates select="shop"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="shop">
<xsl:element name="TABLE" use-attribute-sets="aqua-table">
<TR>
<TH WIDTH="150">Abteilung:</TH>
<TH WIDTH="100">Artikel:</TH>
<TH WIDTH="100">Preis:</TH>
</TR>
<xsl:apply-templates select="order/product"/>
</xsl:element>
</xsl:template>
<xsl:template match="product">
<TR>
<TD><xsl:value-of select="@department"/></TD>
<TD><xsl:value-of select="name"/></TD>
<TD ALIGN="RIGHT">
<xsl:value-of select="price"/>
<xsl:text> </xsl:text>
<xsl:value-of select="currency"/>
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>
|