<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dir="http://apache.org/cocoon/directory/2.0">

<xsl:template match="/">
		<IDlist>
		<xsl:apply-templates select="//dir:file">
			<xsl:sort order="ascending" select="@name">
			</xsl:sort>
		 </xsl:apply-templates>
		 </IDlist>
		 
</xsl:template>
 
   <xsl:template match="dir:file">
	<!-- ID><xsl:value-of select="substring-before(substring-after(@name, 'K'),'.xml')"/></ID -->
	
	<xsl:variable name="XML_content" select="document(concat('cocoon:/FLWB/dossier.xml?dossierID=',substring-before(substring-after(@name, 'K'),'.xml')))//FLWBDOC"/>
	<xsl:copy-of select="$XML_content"/>


 </xsl:template>


</xsl:stylesheet>

