<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!--
// // See license.txt for license information. // // filesxml.xsl // // 7-Feb-2006 phamilton Created //
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="text"/>
    <xsl:template name="newline">
        <xsl:text> </xsl:text>
    </xsl:template>
    <xsl:template name="dofiles">
        <xsl:param name="path"/>
        <xsl:param name="files"/>
        <xsl:for-each select="files">
            <xsl:for-each select="file">
                <xsl:if test="contains(@name, '.xml') or contains(@name, '.xsl')">
                    <xsl:value-of select="$path"/>
                    <xsl:text>/</xsl:text>
                    <xsl:value-of select="@name"/>
                    <xsl:call-template name="newline"/>
                </xsl:if>
            </xsl:for-each>
            <xsl:for-each select="schema">
                <xsl:value-of select="$path"/>
                <xsl:text>/</xsl:text>
                <xsl:value-of select="@name"/>
                <xsl:call-template name="newline"/>
            </xsl:for-each>
            <xsl:for-each select="folder">
                <xsl:variable name="newpath">
                    <xsl:value-of select="$path"/>
                    <xsl:text>/</xsl:text>
                    <xsl:value-of select="@name"/>
                </xsl:variable>
                <xsl:call-template name="dofiles">
                    <xsl:with-param name="path" select="$newpath"/>
                    <xsl:with-param name="files" select="files"/>
                </xsl:call-template>
            </xsl:for-each>
        </xsl:for-each>
    </xsl:template>
    <xsl:template match="files">
        <xsl:for-each select="folder">
            <xsl:call-template name="dofiles">
                <xsl:with-param name="path" select="@name"/>
                <xsl:with-param name="files" select="files"/>
            </xsl:call-template>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>