--- /dev/null
+<?xml version="1.1" encoding="ISO-8859-1"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp " ">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:n="http://projets.admisource.gouv.fr/xemelios/namespaces#edmn"
+ xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added" version="2.0">
+
+ <xsl:output standalone="yes" method="xml" indent="yes"/>
+
+ <xsl:output encoding="ISO-8859-1"/>
+ <xsl:output version="1.0"/>
+
+ <xsl:param name="language" select="'fr'"/>
+
+ <xsl:template match="/*[position()=1]">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'Edmn'">
+ <Edmn xmlns="http://projets.admisource.gouv.fr/xemelios/namespaces#edmn"
+ xmlns:n="http://projets.admisource.gouv.fr/xemelios/namespaces#edmn"
+ xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added">
+ <xsl:for-each select="./*">
+ <xsl:call-template name="writeElement">
+ <xsl:with-param name="el" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </Edmn>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="writeElement">
+ <xsl:param name="el"/>
+ <xsl:param name="annee"/>
+ <xsl:param name="mois"/>
+ <xsl:element name="{name($el)}"
+ namespace="http://projets.admisource.gouv.fr/xemelios/namespaces#edmn">
+ <xsl:for-each select="$el/@*">
+ <xsl:choose>
+ <xsl:when test="name($el) = 'LibelleComptable' and .='Non Disponible'"><xsl:attribute name="{name(.)}">Libellé absent</xsl:attribute></xsl:when>
+ <xsl:when test="name($el) = 'Ministere' and name(.) = 'LibelleMinistere' and .='Non Disponible'"><xsl:attribute name="{name(.)}">Libellé absent</xsl:attribute></xsl:when>
+ <xsl:when test="name($el) = 'LibelleOrdonnateur' and .='Non Disponible'"><xsl:attribute name="{name(.)}">Libellé absent</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="{name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="contains('|LigneEdmn|',concat('|',name($el),'|'))">
+ <xsl:attribute name="withPJ" namespace="http://projets.admisource.gouv.fr/xemelios/namespaces#added">
+ <xsl:choose>
+ <xsl:when test="count($el//n:PJ) > 0 or count($el//PJ) > 0">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="contains('|Liasse|',concat('|',name($el),'|'))">
+ <xsl:attribute name="generated-id"
+ namespace="http://projets.admisource.gouv.fr/xemelios/namespaces#added">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="contains('|NumLiasseNationale|',concat('|',name($el),'|'))">
+ <xsl:attribute name="allLiasse" namespace="http://projets.admisource.gouv.fr/xemelios/namespaces#edmn">
+ <xsl:choose>
+ <xsl:when test="$el/Liasse/@national"><xsl:value-of select="string-join($el/Liasse/@national,' ')"/></xsl:when>
+ <xsl:when test="$el/n:Liasse/@national"><xsl:value-of select="string-join($el/n:Liasse/@national,' ')"/></xsl:when>
+ </xsl:choose>
+
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:for-each select="$el/*">
+ <xsl:call-template name="writeElement">
+ <xsl:with-param name="el" select="."/>
+ <xsl:with-param name="annee" select="$annee"/>
+ <xsl:with-param name="mois" select="$mois"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:value-of select="$el/text()"/>
+ </xsl:element>
+ </xsl:template>
+
+
+</xsl:stylesheet>