- XML:
<_xml-stylesheet type="text/css" href="patria.css"_>
<_xml-stylesheet type="text/xsl" href="patria.xsl"_>
<patria>
<multiplex>
<film>Shrek</film>
<date>10.10.2010</date>
<time>10:10</time>
<time>22:22</time>
<tip>3d</tip>
<film>Up</film>
<date>11.10.2010</date>
<date>13.10.2010</date>
<time>12:30</time>
<tip>family</tip>
<tip>comedy</tip>
</multiplex>
<centru>
<film>Solt</film>
<date>15.10.2010</date>
<time>22:00</time>
<tip>action</tip>
</centru>
<riscani>
<film>Americanul</film>
<date>14.10.2010</date>
<time>12:00</time>
<tip>drama</tip>
</riscani>
</patria>
- XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2 align="center">PATRIA</h2>
<table border="1" bgcolor="orange" width="30%" align="center">
<tr>
<th>film</th>
<th>date</th>
<th>time</th>
<th>tip</th>
</tr>
<xsl:for-each select="patria/multiplex">
<tr>
<xsl:choose>
<xsl:when test="film='Up'">
<tr>
<td ><xsl:value-of select="film"/></td>
<td bgcolor="red"><small>("Up" canceled!)</small></td>
</tr>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="film"/></td>
</xsl:otherwise>
</xsl:choose>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="time"/></td>
<td><xsl:value-of select="tip"/></td>
</tr>
</xsl:for-each>
<xsl:for-each select="patria/centru">
<tr>
<td><xsl:value-of select="film"/></td>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="time"/></td>
<td><xsl:value-of select="tip"/></td>
</tr>
</xsl:for-each>
<xsl:for-each select="patria/riscani">
<tr>
<td><xsl:value-of select="film"/></td>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="time"/></td>
<td><xsl:value-of select="tip"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>