<?xml version="1.0" encoding="utf-8"?>

<xslt:stylesheet version="1.0"
				xmlns:xslt="http://www.w3.org/1999/XSL/Transform">

<!-- © 2005 Stefan Mintert 
	 This is copyrighted material. Please read
	 http://www.linkwerk.com/pub/xml/invitation/licence.txt
	 
	 The purpose of this XSLT style sheet is described online
	 at http://www.linkwerk.com/pub/xml/invitation/.
-->


<xslt:output 
	method="html"
	encoding="utf-8"
        />


<!-- ====================================================== -->
<!-- Template for root element type 'invitation' -->

<xslt:template match="invitation">
<html>
 <head>
  <title>Invitation to <xslt:value-of select="event"/></title>
  <style type="text/css">
	body {
		font-family:	"Comic Sans MS", sans-serif;
		background:		#999999;
		font-size:		150%;
	}
	div.body {
		margin-left:	20%;
		margin-right:	20%;
		background:		#ffffff;
		border:			solid 3px red;
		padding:		2ex 3em;
	}
	h1 {
		font-size:		180%;
		color:			#ffffff;
		background:		#66aa66;
		padding:		1ex 1.5em;
		text-align:		center;
	}
	p.meta {
		border-left:	solid 1em #ff3333;
		border-right:	solid 1em #ff3333;
		padding-left:	1em;
		padding-right:	1em;
	}
	address {
		text-align: 	center;
		font-size:		66%;
		font-family:	sans-serif;
		margin-top: 	2ex;
	}
	.location, .date, .time {
		font-weight:	bold;
	}
  </style>
 </head>
 <body>
 
  <div class="body">
	<xslt:apply-templates select="event"/>
	<p class="meta">I'd like to invite you to
		come to <xslt:apply-templates select="location"/>.
		The event takes place on 
		<xslt:apply-templates select="date"/>
		at
		<xslt:apply-templates select="time"/>
	</p>
	<xslt:apply-templates select="description|dresscode"/>
  </div>
 
 <address>
 	Generated from XML with <kbd>invitation2html.xslt</kbd>.
	Copyright &#169; <a href="http://www.mintert.com/">Stefan Mintert</a>,<br />
   <a href="http://www.linkwerk.com/">Linkwerk</a>
 </address>
 </body>
</html>
</xslt:template>
<!-- ====================================================== -->




<!-- ====================================================== -->
<!-- Template for element type 'event' -->

<xslt:template match="event">
   <h1><xslt:apply-templates/></h1>
</xslt:template>
<!-- ====================================================== -->




<!-- ====================================================== -->
<xslt:template match="location | date | time">
   <span class="{local-name()}"><xslt:apply-templates/></span>
</xslt:template>
<!-- ====================================================== -->





<!-- ====================================================== -->
<!-- Template for element type 'para' -->

<xslt:template match="para">
	<p>
		<xslt:apply-templates/>
	</p>
</xslt:template>
<!-- ====================================================== -->




<!-- ====================================================== -->
<!-- Template for element type 'emph' -->

<xslt:template match="emph">
 <em><xslt:apply-templates/></em>
</xslt:template>
<!-- ====================================================== -->


<!-- ====================================================== -->
<!-- Template for element type 'description' -->

<xslt:template match="description">
 <div class="description"><strong>What's up? </strong>
 <xslt:apply-templates/></div>
</xslt:template>
<!-- ====================================================== -->

<!-- ====================================================== -->
<!-- Template for element type 'dresscode' -->

<xslt:template match="dresscode">
 <p class="dresscode"><strong>What to wear? </strong> <xslt:apply-templates/></p>
</xslt:template>
<!-- ====================================================== -->


</xslt:stylesheet>
