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

<!--
$Id: all.xsl 9931 2010-11-19 19:58:46Z gawrilow $

This file copies the content of every application's xml file into a single file,
which is then used for the creation of the index of the documentation.

Author: Silke Möser, 2010
-->


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

<xsl:output method="xml"/>

<xsl:template match="/">
<pm:polymake_apps>

	<xsl:for-each select="/pm:applications/pm:file">
		<xsl:apply-templates select="document(@name)/pm:application" />
	</xsl:for-each>

</pm:polymake_apps>
</xsl:template>


<xsl:template match="@*|node()">
   <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
</xsl:template>

<xsl:template match="@xml:id">
	<xsl:attribute name="id"><xsl:value-of select="."/></xsl:attribute>
</xsl:template>


</xsl:stylesheet>
