<?xml version="1.0"?>

<!-- the entity declaration below is apparently a bit of a hack, but it
works -->
<!DOCTYPE stylesheet [
<!ENTITY nbsp "<xsl:text xmlns:xsl='http://www.w3.org/1999/XSL/Transform' disable-output-escaping='yes'>&amp;nbsp;</xsl:text>">
]>

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

<!-- variables for colors -->
<xsl:variable name="toc-bgcolor">#E1CEE9</xsl:variable>

<xsl:attribute-set name="font-attributes">
	<xsl:attribute name="size">-1</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="toc-section-title-font-attributes">
	<xsl:attribute name="size">-1</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="toc-intro-font-attributes">
	<xsl:attribute name="size">-1</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="sidebar-font-attributes">
	<xsl:attribute name="size">-1</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="footer-font-attributes">
	<xsl:attribute name="size">-2</xsl:attribute>
</xsl:attribute-set>

<!-- set up a rule that passes undefined elements (i.e. raw HTML) straight
through -->
<xsl:template match="*">
	<xsl:element name="{name(.)}">
	<xsl:for-each select="@*">
		<xsl:attribute name="{name(.)}">
			<xsl:value-of select="."/>
		</xsl:attribute>
	</xsl:for-each>
	<xsl:apply-templates/>
	</xsl:element>
</xsl:template>

<!-- Now the document-specific rules -->

<!-- need to redefine the <A> tag for the whole tag to be on the same line -->
<xsl:template match="a | A">
	<xsl:element name="{name(.)}">
		<!-- copy through any attributes -->
		<xsl:for-each select="@*">
			<xsl:attribute name="{name(.)}">
				<xsl:value-of select="."/>
			</xsl:attribute>
		</xsl:for-each>
         <xsl:apply-templates/>
</xsl:element>
</xsl:template>

<!-- redefine the <P> tag to ensure justified paragraphs -->
<xsl:template match="p | P">
	<xsl:element name="P">
		<xsl:attribute name="ALIGN">JUSTIFY</xsl:attribute>
	<xsl:apply-templates/>
	</xsl:element>
</xsl:template>

<!-- redefine the <CODE> tag to switch to Courier font-->
<xsl:template match="code | CODE">
	<FONT FACE="COURIER">
	<xsl:apply-templates/>
	</FONT>
</xsl:template>

<!-- redefine the <TD> and <TH> tags to ensure that the contents of table
cells is in the right font -->
<xsl:template match="td | TD | th | TH">
	<xsl:element name="{name(.)}">
		<!-- copy through any attributes -->
		<xsl:for-each select="@*">
			<xsl:attribute name="{name(.)}">
				<xsl:value-of select="."/>
			</xsl:attribute>
		</xsl:for-each>
		<!-- wrap up the contents in the desired font -->
		<FONT xsl:use-attribute-sets="font-attributes">
		<xsl:apply-templates/>
		</FONT>
	</xsl:element>
</xsl:template>

<!-- set up a rule allowing comments to be passed through. This is vital if
server-side includes are to be possible -->
<xsl:template match="comment">
	<xsl:comment><xsl:apply-templates/></xsl:comment>
</xsl:template>

<!-- The master rule that wraps up the entire document -->
<xsl:template match="squizz-web-page">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

	<xsl:comment>
	This file was automatically generated from an XML source using an XSL
	stylesheet. Do NOT attempt to edit it. All changes will be lost.
	</xsl:comment>

	<head>
	<title><xsl:apply-templates select="header-title"/></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="http://assets.monash.edu.au/styles/monash.css" type="text/css" />
	<link rel="stylesheet" href="http://assets.monash.edu.au/styles/print.css" type="text/css" media="print" />
	<link rel="shortcut icon" href="http://www.monash.edu.au/favicon.ico" />
	<xsl:comment>include Information Technology stylesheet</xsl:comment>
	<link rel="stylesheet" href="http://www.infotech.monash.edu.au/assets/styles/infotech.css" type="text/css"/>
	<meta name="author" content="ing,dms" />
	<iwov_metatags docroots='@docRoots' preprocess='$funcref' xsltpath='custom/config/stdMetadataOutput.xsl' mtlookup='0'/>
	</head>

<body>
<table id="layouttable" summary="Layout for page">
	<thead>
		<tr id="pageheaderrow">
			<td colspan="2">
			<xsl:comment>SUBNET DETECTION</xsl:comment>
																									<xsl:comment>C H E C K   I F    B R O W S E R   I S    N E T S C A P E 4   A N D   S E T  NS4  V A R </xsl:comment>
	<!--
 	<script language="javascript" src="http://infotech.monash.edu/assets/scripts/stats.js" ></script>
	-->
<a name="top" />
<xsl:comment>V E R S I O N   F O R   O L D E R   B R O W S E R S </xsl:comment>
 <xsl:comment>V E R S I O N   F O R   N E W E R   B R O W S E R S
 </xsl:comment> <xsl:comment>A C C E S S I B I L I T Y   S E C T I O N
 </xsl:comment>  <div class="spacer"></div> <xsl:comment>S I T E   L O G O
 &amp;  B A N N E R   I M A G E </xsl:comment> <div id="global-header">
 <div id="global-images"> <a href="http://infotech.monash.edu.au"
 accesskey="0"><img id="logo" src="http://infotech.monash.edu.au/assets/images/infotechlogo.gif" width="343" height="79" alt="Information Technology" /> </a> 		

<img id="banner-image" src="http://www.csse.monash.edu.au/~davids/images/TransparentPixel.gif" width="275" height="79" alt=" " title="Decorative Image" />
 	</div> 	<div class="spacer"></div> 	<xsl:comment>G L O B A L   N A V   B A R </xsl:comment> 	<table id="global-nav" summary="Layout for site-wide navigation"> 		<tr> 			<td>
				 					<a
									href="http://www.monash.edu.au">Monash
									Home</a> | <a href="http://infotech.monash.edu.au/">Infotech Home</a> |
				<a href="http://infotech.monash.edu.au/about/">About Us</a> | <a href="http://infotech.monash.edu.au/courses/">Courses</a> | <a href="http://infotech.monash.edu.au/units/">Units</a> | <a href="http://infotech.monash.edu.au/resources/">Support &amp; Services </a> <xsl:comment>| <a href="http://infotech.monash.edu.au/promotion/study-with-us/">Study with Us</a></xsl:comment>| <a href="http://infotech.monash.edu.au/research/">Research</a> <xsl:comment>| <a href="http://infotech.monash.edu.au/communities/">Communities</a></xsl:comment> </td> 		</tr> 	</table>
	<xsl:comment>U T I L I T Y   N A V   B A R </xsl:comment>
	<table id="global-utils" summary="Layout for utility navigation"
	style="width: 100%; vertical-align: middle; horizontal-align: left" >
		</table>
	<xsl:comment>I N T E R N A L   A N C H O R S </xsl:comment>
		<table id="global-utils" style="width: 100%; vertical-align: middle; horizontal-align: left">
	    <tr align="left">
	<td>
		<STRONG>
		In this page:&nbsp;&nbsp;
		</STRONG>
		<xsl:apply-templates select="//section/title" mode="toc"/>
	</td>
    </tr>
</table>
		</div>  
			</td>

		</tr>
	</thead>
	<tbody>
		<tr>
			
			<td valign="top">

<!--   E N D    H E A D E R   -->


<H1>
<xsl:apply-templates select="page-title"/>
</H1>


		<!-- BODY OF PAGE -->
		<xsl:apply-templates select="body"/>
		<!-- END BODY -->
	<!--   B E G I N   F O O T E R   -->
			</td>

		</tr>
	</tbody>
	<tfoot>
		<tr id="pagefooterrow">
			<td colspan="2">
				<!-- A D D   H O R I Z O N T A L   R U L E   F O R   O L D E R   B R O W S E R S  -->
			<table id="footer" width="100%">
		<tr align="center" valign="middle">
		<td>
		Generated from XML source and an
		<A HREF="/~davids/xsl/squizz-web-page.xsl">XSL
		stylesheet</A>,
		using <A HREF="http://xmlsoft.org/XSLT/">xsltproc</A>
		<BR/>
		Last modified
		<!-- embedded Javascript to output the last modification date -->
		<script language="javascript" type="text/javascript">
		<xsl:comment>
		<xsl:text>

		function monthString(Month) {

			switch(Month) {
			case 0:
				return 'January';
			case 1:
				return 'February';
			case 2:
				return 'March';
			case 3:
				return 'April';
			case 4:
				return 'May';
			case 5:
				return 'June';
			case 6:
				return 'July';
			case 7:
				return 'August';
			case 8:
				return 'September';
			case 9:
				return 'October';
			case 10:
				return 'November';
			case 11:
				return 'December';
			}
		}

		function lastMod() {

			if (document.lastModified == 0) {
				return '';
			}
			Modif = new Date(document.lastModified);
			Year = takeYear(Modif);
			Month = Modif.getMonth();
			Day = Modif.getDate();
			Time = Modif.getHours() + ':' + Modif.getMinutes() + ':' + Modif.getSeconds() ;
			return(Day + ' ' + monthString(Month) + ' ' + Year + ' ' + Time);
		}

		function takeYear(theDate) {
			x = theDate.getYear();
			var y = x % 100;
			y += (y &lt; 38) ? 2000 : 1900;
			return y;
			
		}

		// csse web server does not provide a last modified line in its
		// response
		//document.write(lastMod());
		
		
		</xsl:text>
		</xsl:comment>
		</script>
		<!-- if a last-editor tag is defined, output a byline, linked to a
		mailto: tag if the email attribute is given -->
		<xsl:if test="last-editor">
			by
			<xsl:choose>
				<xsl:when test="last-editor/@email">
					<xsl:element name="A">
						<xsl:attribute name="HREF">
							mailto:<xsl:value-of select="last-editor/@email"/>
						</xsl:attribute>
						<xsl:value-of select="last-editor"/>
					</xsl:element>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="last-editor"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
		<P/>
		</td>
		</tr>
				</table>
				
 
			</td>

		</tr>
	</tfoot>
</table>
</body>
</html>
	<!--   E N D   F O O T E R   -->
</xsl:template>

<!-- need some empty rules to avoid the default rule -->
<xsl:template match="header-title | page-title | address | item | title">
	<xsl:apply-templates/>
</xsl:template>

<!-- everything other than the header information is in the body -->
<xsl:template match="body">
	<xsl:apply-templates select="personal-info"/>
	<xsl:apply-templates select="contents"/>
</xsl:template>

<!-- this is used for the first part of personal pages. Most pages don't
contain personal-info -->
<xsl:template match="body/personal-info">
	<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="10" BORDER="0">
	<TR>
	<TD WIDTH="30%">
		<xsl:apply-templates select="photo"/>
	</TD>
	<TD VALIGN="TOP">
		<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Role
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="function"/>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Address
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="address"/>
				</FONT>
			</TD>
			</TR>

			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				E-mail
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<A HREF="mailto:{email}">
				<xsl:apply-templates select="email"/>
				</A>
				</FONT>
			</TD>
			</TR>

			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Telephone
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="phone"/>
				</FONT>
			</TD>
			</TR>

			<!--
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Fax
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="fax"/>
				</FONT>
			</TD>
			</TR>

			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Secretary
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="secretary"/>
				</FONT>
			</TD>
			</TR>
			-->

			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="section-title-font-attributes">
				<STRONG>
				Office
				</STRONG>
				</FONT>
			</TD>
			</TR>
			<TR>
			<TD>
				<FONT xsl:use-attribute-sets="font-attributes">
				<xsl:apply-templates select="office"/>
				</FONT>
			</TD>
			</TR>

		</TABLE>
	</TD>
	</TR>
	</TABLE>
</xsl:template>

<xsl:template match="personal-info/photo">
	<CENTER>
	<xsl:if test="@link">
		<A HREF="{@link}">
		<IMG border="0" src="{@url}" alt="{@alt}" width="{@width}" height="{@height}"/>
		</A>
	</xsl:if>
	<xsl:if test="not(@link)">
		<IMG border="0" src="{@url}" alt="{@alt}" width="{@width}" height="{@height}"/>
	</xsl:if>
	</CENTER>
</xsl:template>

<!-- the contents is everything other than personal-info. Most pages have a
body which only contains "contents". -->
<xsl:template match="body/contents">
		<xsl:apply-templates/>
</xsl:template>

<!-- everything within contents should be wrapped up in a section, which
has an optional title, and three other possible child elements: itemize,
text and multicol. All these can occur multiple times, and they can be
nested. -->
<xsl:template match="section">
	<P>
	<xsl:apply-templates select="title"/>
	</P>
	<!-- use "if" to avoid empty rows if there are no valid children -->
	<xsl:if test="itemize | text | multicol | listing">
		<FONT xsl:use-attribute-sets="font-attributes">
		<xsl:apply-templates select="itemize-index | itemize | text | multicol | listing"/>
		</FONT>
	</xsl:if>
</xsl:template>

<xsl:template match="section/title">
	<xsl:element name="A">
		<xsl:attribute name="NAME">
			<xsl:if test="../@name">
				<xsl:value-of select="../@name"/>
			</xsl:if>
			<xsl:if test="not(../@name)">
				<xsl:value-of select="."/>
			</xsl:if>
		</xsl:attribute>
	</xsl:element>
	<H3>
	<xsl:if test="@href">
		<A HREF="{@href}">
		<xsl:apply-templates/>
		</A>
	</xsl:if>
	<xsl:if test="not(@href)">
		<xsl:apply-templates/>
	</xsl:if>
	</H3>
</xsl:template>
<xsl:template match="section/title" mode="toc">
	<xsl:if test="not(@notoc)">
		<xsl:element name="A">
			<xsl:attribute name="HREF">
				<xsl:if test="../@name">
					#<xsl:value-of select="../@name"/>
				</xsl:if>
				<xsl:if test="not(../@name)">
					#<xsl:value-of select="."/>
				</xsl:if>
			</xsl:attribute>
			<xsl:apply-templates/>
			|
		</xsl:element>
	</xsl:if>
</xsl:template>


<xsl:template match="section//text">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="section//itemize">
	<UL>
		<xsl:apply-templates/>
	</UL>
</xsl:template>

<xsl:template match="itemize/item">
	<LI>
		<xsl:apply-templates/>
	</LI>
</xsl:template>

<xsl:template match="section//itemize/item/title">
	<xsl:if test="../@name">
		<xsl:element name="A">
			<xsl:attribute name="NAME">
				<xsl:value-of select="../@name"/>
			</xsl:attribute>
		</xsl:element>
	</xsl:if>
	<STRONG>
	<xsl:choose test="./@href">
		<xsl:when test="./@href">
			<xsl:element name="A">
				<xsl:attribute name="HREF">
					<xsl:value-of select="./@href"/>
				</xsl:attribute>
				<xsl:apply-templates/>
			</xsl:element>
		</xsl:when>
		<xsl:otherwise>
			<xsl:apply-templates/>
		</xsl:otherwise>
	</xsl:choose>
	</STRONG>
	<BR/>
</xsl:template>

<xsl:template match="section/itemize-index">
	In this section:<BR/>
	<xsl:for-each select="../itemize/item/title">
		&nbsp;&nbsp;&nbsp;&nbsp;
		<xsl:element name="A">
			<xsl:attribute name="HREF">
				#<xsl:value-of select="../@name"/>
			</xsl:attribute>
			<xsl:value-of select="."/><BR/>
		</xsl:element>
	</xsl:for-each>
</xsl:template>

</xsl:stylesheet>

