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

<!--
$Id: doc_index.xsl 9996 2010-12-14 15:15:51Z smoeser $

This file produces the index of the polymake documentation.

Author: Silke Möser, 2010
-->

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:html="http://www.w3.org/1999/xhtml"
	xmlns:pm="http://www.polymake.de/ns/docs#3"
>

<xsl:include href="macros.xsl" />

<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />


<xsl:template match="/">
	<div id="content">
	<h1>polymake: index</h1>
	<p>This table contains all entities available in polymake in alphabetical order.</p>
	<p>For everything listed, the <b>name</b>, the <b>type</b> (i.e., one of object, property, function, property-type, application, option, common-option-list or permutation), the corresponding <b>application</b> and, for properties and user-methods the <b>object</b> or <b>property-type</b> which they belong to are given.</p> 

	<br/>
	<table border="1">
		<tr>
			<th align="left">Name</th>
			<th align="left">Type</th>
			<th align="left">Object or Property-Type</th>
			<th align="left">Application</th>
		</tr>
	
		<xsl:apply-templates select="//*[@name!='']">
			<xsl:sort select="translate(@name,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" lang="en"/>
		</xsl:apply-templates>	 
					
	</table>

				
	</div>
</xsl:template>



<xsl:template match="//*[@name!='']">

<xsl:if test="name()='object' or name()='application' or name()='property-type' or name()='function' or name()='property' or name()='permutation' or name()='option' or name()='common-option-list'">
<xsl:if test="name()!='option' or ancestor::pm:common-option-list">
<xsl:if test="not(name()='application' and @name!=ancestor-or-self::pm:application/@name)">
<xsl:if test="name()!='common-option-list' or not(@href)">
	<tr>
		<td><b><a>
			<xsl:choose>
			<xsl:when test="name()='option'">
				<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html#<xsl:value-of select="ancestor::pm:common-option-list/@id"/></xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
				<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html#<xsl:value-of select="@id"/></xsl:attribute>
			</xsl:otherwise>
			</xsl:choose>
			<xsl:value-of select="@name"/>
		</a></b></td>
		
		<td><xsl:value-of select="name()"/></td>
		
		<td><a>
			<xsl:choose>
			<xsl:when test="ancestor::pm:object">
				<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html#<xsl:value-of select="ancestor::pm:object/@id"/></xsl:attribute>
				<xsl:value-of select="ancestor::pm:object/@name"/>
			</xsl:when>
			<xsl:when test="ancestor::pm:property-type">
				<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html#<xsl:value-of select="ancestor::pm:property-type/@id"/></xsl:attribute>
				<xsl:value-of select="ancestor::pm:property-type/@name"/>
			</xsl:when>
			<xsl:when test="ancestor::pm:common-option-list">
				<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html#<xsl:value-of select="ancestor::pm:common-option-list/@id"/></xsl:attribute>
				<xsl:value-of select="ancestor::pm:common-option-list/@name"/>
			</xsl:when>
			</xsl:choose>
		</a></td>

		<td><a>
			<xsl:attribute name="href"><xsl:value-of select="ancestor-or-self::pm:application/@name"/>.html</xsl:attribute>
			<xsl:value-of select="ancestor-or-self::pm:application/@name"/>		
		</a></td>
	</tr>
	
</xsl:if></xsl:if></xsl:if></xsl:if>

</xsl:template>



</xsl:stylesheet>
