<?xml version='1.0' encoding="UTF-8" ?>
<xsl:stylesheet version='1.0'  xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:output method='html' />

<xsl:template match='/' >

<html>
<head>
<title><xsl:value-of select='//title' /></title>
		
<script language='Javascript' >

function toggleBlock(thisid)
{
var thislayer=document.getElementById(thisid);var thislayerplus=document.getElementById(thisid+'plus');
if (thislayer.style.display == 'none') 
 {
 thislayer.style.display='block'; thislayerplus.style.display='none'; 
 }
 else
 {
 thislayer.style.display='none'; thislayerplus.style.display='inline';
 }
}

function collapseAll() {
 divColl = document.getElementsByTagName('div');
        for (i=0; i&lt;divColl.length; i++) {
               divColl[i].style.display =  'none';                                                        
	}
 divColl = document.getElementsByTagName('strong');
        for (i=0; i&lt;divColl.length; i++) {
               divColl[i].style.display =  'inline';                                                        
	}
}

function expandAll() {
 divColl = document.getElementsByTagName('div');
        for (i=0; i&lt;divColl.length; i++) {
               divColl[i].style.display =  'inline';                                                        
	}
 divColl = document.getElementsByTagName('strong');
        for (i=0; i&lt;divColl.length; i++) {
               divColl[i].style.display =  'none';                                                        
	}
}

</script>

<style type='text/css' >.OutlineElement {
	position: relative;
	font-family: arial;
	left:30px;
	line-height: 130%;
}
.Parent2 {
	cursor: se-resize;
	font-family: arial;
	font-size:18pt;
	font-style:italic;
}
.Parent3 {
	cursor: se-resize;
	font-size:14pt;
	color:#000000;
}
.Parent4 {
	cursor: se-resize;
	font-size:12pt;
	color:#000000;
}
.Parent5 {
	cursor: se-resize;
	color:#000000;
}
.Parent6 {
	cursor: se-resize;
	color:#000000;
}
.Parent7 {
	cursor: se-resize;
	color:#000000;
}
.Parent8 {
	cursor: se-resize;
	color:#000000;
}
.Parent9 {
	cursor: se-resize;
	color:#aa0000;
}
.Parent10 {
	cursor: se-resize;
	color:#aa00aa;
}
.Parent11 {
	cursor: se-resize;
	color:#220000;
}
.Child { cursor : normal;
	font-family: georgia;
        }
A {font-size:12pt;}
	A.IndexNav { color:ff0000; font-size : 12pt;}
	A.TopNav { color:0000ff; font-size : 14pt;text-decoration:none;font-style:italic; position: relative; left:30px;}
	A.TopNav:hover { text-decoration:underline;color:ff0000; }

</style>
</head>

<body bgcolor='white' >
	<xsl:apply-templates/>
</body>

</html>

</xsl:template>
	<xsl:template match='body' >
		<a href='javascript:expandAll()'  class='IndexNav' >Expand All </a><br/>
		<a href='javascript:collapseAll()'  class='IndexNav' >Collapse All </a><br/>
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match='head' >
	<h1 align='center' ><xsl:value-of select='title' /></h1>
	<h3 align='center' >Last Modified - <xsl:value-of select='dateModified' /></h3>
</xsl:template>
	
<xsl:template match='outline' >

		<xsl:variable name='thisid' >
			<xsl:value-of select='generate-id()' />
		</xsl:variable>
		<xsl:choose>
			<xsl:when test='@type=&apos;img&apos;' >
			
				<a>
			
				<xsl:attribute name='href' >
					<xsl:value-of select='@text' />
				</xsl:attribute>
			
				<img>
			
				<xsl:attribute name='src' >
					<xsl:value-of select='@text' />
				</xsl:attribute>
			
				</img>
			
				<xsl:value-of select='@text' />
			
				</a>
			
				</xsl:when>
			
			<xsl:when test='contains(@type,&apos;xlink&apos;)' >
				<xsl:variable name='buzzid' >
				<xsl:value-of select='substring-after(@xlink,&apos;buzzid=&apos;)' />
				</xsl:variable>
				<a>
				<xsl:attribute name='href' >
				<xsl:value-of select='concat(substring-before(substring-after(@xlink,&apos;:&apos;),&apos;#&apos;),&apos;.html#&apos;,substring($buzzid,2,string-length($buzzid)-3))' />
			</xsl:attribute>
			<xsl:value-of select='@text' />
			</a>
			</xsl:when>
			
			<xsl:when test='contains(@type,&apos;link&apos;)' ><a>
				
						<xsl:choose>
						<xsl:when test='contains(@url,&apos;.opml&apos;) or contains(@url,&apos;.OPML&apos;)' >
							
						</xsl:when>
						<xsl:otherwise>
							<xsl:attribute name='href' >
								<xsl:value-of select='@url' />
							</xsl:attribute>
							
						</xsl:otherwise>
					</xsl:choose>
				
				
				<xsl:value-of select='@text' /></a> - 
					
					<xsl:choose>
						<xsl:when test = 'document(@url)//channel/description'>
							<xsl:value-of disable-output-escaping="yes" select="string(document(@url)//channel/description)"/> 
							<!--  <xsl:text disable-output-escaping="yes">string(document(@url)//channel/description)</xsl:text> -->
						</xsl:when>		
						<xsl:otherwise>
							<xsl:choose>
							<xsl:when test='contains(@url,&apos;.opml&apos;) or contains(@url,&apos;.OPML&apos;)' >
							
							</xsl:when>
							<xsl:otherwise>
								Description unavailable. (Description tag could not be found, error in RSS 2.0 or illegal character in originating site's feed.)
							</xsl:otherwise>	
							</xsl:choose>
						</xsl:otherwise>	
					</xsl:choose>				
				
			</xsl:when>

			
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test='count(ancestor::*)=2' ><span>
						<xsl:attribute name='id' >
							<xsl:value-of select='@buzzid' />
						</xsl:attribute>
						<xsl:choose>
							<xsl:when test='count(child::*)!=0' >
								<xsl:attribute name='onClick' >
									<xsl:value-of select='concat(concat(&quot;toggleBlock(&apos;&quot;,$thisid),&quot;&apos;)&quot;)' />
								</xsl:attribute>
								<xsl:attribute name='class' >
									<xsl:value-of select='concat(&apos;Parent&apos;,count(ancestor::*))' />
								</xsl:attribute>
								<xsl:attribute name='style' >cursor:se-resize </xsl:attribute>
							</xsl:when>
							<xsl:otherwise>
								<xsl:attribute name='class' >Child</xsl:attribute>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:if test='count(child::*)!=0' ><strong style='display:none;color:red' >
							<xsl:attribute name='id' >
								<xsl:value-of select='concat($thisid,&quot;plus&quot;)' />
							</xsl:attribute>+ </strong>
						</xsl:if>
						<xsl:if test='@role' ><i>
							<xsl:value-of select='@role' /></i><br/>
						</xsl:if><b><xsl:value-of select='@text' /></b>
						<xsl:text>       </xsl:text>
						</span>
					</xsl:when><xsl:when test='contains(@buzzid,&apos;.&apos;)' ><span>
						<xsl:attribute name='id' >
							<xsl:value-of select='@buzzid' />
								</xsl:attribute>
									<xsl:choose>
										<xsl:when test='count(child::*)!=0' >
											<xsl:attribute name='onClick' >
												<xsl:value-of select='concat(concat(&quot;toggleBlock(&apos;&quot;,$thisid),&quot;&apos;)&quot;)' />
											</xsl:attribute><xsl:attribute name='class' >
												<xsl:value-of select='concat(&apos;Parent&apos;,count(ancestor::*))' />
								</xsl:attribute>
								<xsl:attribute name='style' >cursor:se-resize </xsl:attribute>
					</xsl:when>
					<xsl:otherwise>
						<xsl:attribute name='class' >Child</xsl:attribute>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test='count(child::*)!=0' ><strong style='display:none;color:red' >
					<xsl:attribute name='id' >
						<xsl:value-of select='concat($thisid,&quot;plus&quot;)' />
					</xsl:attribute>+ </strong>
				</xsl:if>
				<xsl:if test='@role' ><i>
					<xsl:value-of select='@role' /></i><br/>
				</xsl:if><b>
				<xsl:value-of select='@text' /></b>
				<xsl:text>       </xsl:text>
			</span>
				</xsl:when>
				<xsl:otherwise><span>
				<xsl:if test='count(child::*)!=0' >
				<xsl:attribute name='onClick' >
				<xsl:value-of select='concat(concat(&quot;toggleBlock(&apos;&quot;,$thisid),&quot;&apos;)&quot;)' />
				</xsl:attribute>
				<xsl:attribute name='style' >cursor:se-resize </xsl:attribute>
			</xsl:if>
			<xsl:attribute name='class' >
			<xsl:value-of select='concat(&apos;Parent&apos;,count(ancestor::*))' />
			</xsl:attribute>
			<xsl:if test='count(child::*)!=0' ><strong style='display:none;color:red' >
			<xsl:attribute name='id' >
			<xsl:value-of select='concat($thisid,&quot;plus&quot;)' />
			</xsl:attribute>+ </strong>
			</xsl:if>
			<xsl:if test='@role' ><i>
			<xsl:value-of select='@role' /></i><br/>
			</xsl:if><xsl:value-of select='@text' /></span>
			</xsl:otherwise>
			</xsl:choose>
			</xsl:otherwise>
		</xsl:choose><br/>
		<xsl:if test='count(child::*)!=0' ><div>
		<xsl:attribute name='class' >OutlineElement
		</xsl:attribute>
		<xsl:attribute name='style' >display:block
		</xsl:attribute><xsl:attribute name='id' >
		<xsl:value-of select='$thisid' />
		</xsl:attribute><table cellpadding='10'  border='1'  cellspacing='0' >
		<xsl:attribute name='style' >background-color:
		<xsl:choose>
		<xsl:when test='count(ancestor::*)=2' >#ffffff
		</xsl:when>
		<xsl:when test='count(ancestor::*)=3' >#ccccbb
		</xsl:when>
		<xsl:when test='count(ancestor::*)=4' >#ffffff
		</xsl:when>
		<xsl:when test='count(ancestor::*)=5' > #ccccbb
		</xsl:when>
		<xsl:when test='count(ancestor::*)=6' > #eeeeee
		</xsl:when>
		<xsl:when test='count(ancestor::*)=7' > #ccccbb
		</xsl:when>
		<xsl:when test='count(ancestor::*)=8' > #ffffff
		</xsl:when>
		<xsl:when test='count(ancestor::*)=9' > #dddddd
		</xsl:when>
		<xsl:when test='count(ancestor::*)=10' > #eeeeee
		</xsl:when><xsl:when test='count(ancestor::*)=11' > #dddddd
		</xsl:when><xsl:when test='count(ancestor::*)=12' > #cccccc
		</xsl:when><xsl:otherwise>#ccccbb</xsl:otherwise>
</xsl:choose>
</xsl:attribute><tr><td>
<xsl:apply-templates/></td>
</tr>
</table>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

