+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY nbsp " ">
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://projets.admisource.gouv.fr/xemelios/namespaces#anomally" xmlns:n="http://projets.admisource.gouv.fr/xemelios/namespaces#anomally" xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added" xmlns:ano="http://projets.admisource.gouv.fr/xemelios/namespaces#anomally" xmlns:conf="http://projets.admisource.gouv.fr/xemelios/namespaces#config" xmlns:datetime="http://exslt.org/dates-and-times" version="2.0">
- <xsl:param name="encoding" select="'ISO-8859-1'"/>
- <xsl:output method="xhtml" indent="yes"/>
- <xsl:output encoding="ISO-8859-1"/>
-
- <xsl:template match="*"/>
-
- <!-- ICONES : http://www.softicons.com/free-icons/web-icons/blue-gradient-toolbar-icons-by-axialis-team/warning-icon -->
-
- <xsl:param name="language" select="'fr'"/>
- <xsl:param name="affichage" select="''"/>
- <xsl:param name="affichageParam" select="''"/>
- <xsl:param name="ancre" select="''"/>
- <xsl:param name="elementId" select="''"/>
- <xsl:param name="idControle" select="''"/>
- <xsl:param name="config" select="document(.)"/>
-
-
- <xsl:variable name="message.rapport" select="/n:DocumentRapport/n:Message/text()"/>
- <xsl:variable name="trop.anomalies" select="/n:DonneesRapport/n:TropAnos/@n:V"/>
- <!--xsl:variable name="toutes.anomalies" select="/n:DonneesRapport/n:AllAnos/@n:V"/-->
- <xsl:variable name="document.id" select="/n:DocumentRapport/n:DocId/@n:V"/>
- <xsl:variable name="siret" select="/n:DocumentRapport/n:Collectivite/n:Siret/@n:V"/>
- <xsl:variable name="budget.code" select="/n:DocumentRapport/n:Budget/n:Code/@n:V"/>
- <xsl:variable name="version.component.controle" select="/n:DocumentRapport/n:VersionComponentControle/@n:V"/>
- <xsl:variable name="id.rapport" select="/n:DocumentRapport/n:DonneesRapport/n:Rapport/n:Id/@n:V"/>
-
- <xsl:variable name="anomalies"><xsl:copy-of select="/n:DocumentRapport/n:DonneesRapport/n:Rapport/n:Anomalie"/></xsl:variable>
-
- <xsl:template match="/n:DocumentRapport">
- <html>
- <head>
- <xsl:call-template name="style"/>
- <xsl:call-template name="titre"/>
- </head>
- <body>
- <xsl:call-template name="entete"/>
- <br/>
- <xsl:call-template name="parametres"/>
- <xsl:call-template name="warning"/>
- <hr/>
- <xsl:value-of select="count($anomalies//n:Anomalie)"/> anomalies
- <span class="bold">Validation Technique :
- <xsl:choose>
- <xsl:when test="count($anomalies//n:Anomalie[starts-with(n:IdCtrl/@n:V,'TECH')]) > 0">KO<br/>Validation Fonctionnelle : non contrôlée</xsl:when>
- <xsl:otherwise> OK<br/><br/>
- <xsl:choose>
- <xsl:when test="not(count($anomalies//n:Anomalie) eq 0)"> Validation Fonctionnelle : KO<br/>
- </xsl:when>
- <xsl:otherwise> Validation Fonctionnelle : OK<br/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <hr/>
- </span>
- <br/>
- <br/>
- <xsl:if test="count($anomalies//n:Anomalie) > 0">
- <xsl:apply-templates>
- <xsl:with-param name="docid" select="$document.id"/>
- <xsl:with-param name="collectivite" select="$siret"/>
- <xsl:with-param name="budget" select="$budget.code"/>
- </xsl:apply-templates>
- </xsl:if>
- <!--/div-->
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="titre">
- <title>Restitution d'analyse<xsl:if test="string-length($version.component.controle) > 0"> - <xsl:value-of select="$version.component.controle"/></xsl:if></title>
- </xsl:template>
-
- <xsl:template name="entete">
- <table class="entete">
- <tr>
- <td>
- <h1>Rapport d'analyse du fichier <xsl:choose><xsl:when test="exists(n:NomFichier/@n:host)"><a><xsl:attribute name="href">xemelios:/showSrc?host=<xsl:value-of select="n:NomFichier/@n:host"/>&url=<xsl:value-of select="n:NomFichier/@n:fullPath"/></xsl:attribute><xsl:value-of select="n:NomFichier/@n:V"/></a></xsl:when><xsl:otherwise><xsl:value-of select="n:NomFichier/@n:V"/></xsl:otherwise></xsl:choose></h1>
- <xsl:if test="string-length($version.component.controle) > 0">
- <h2>
- <xsl:value-of select="$version.component.controle"/>
- </h2>
- </xsl:if>
- </td>
- </tr>
- <xsl:if test="string-length($message.rapport) > 0">
- <tr>
- <td>
- <h2>
- <xsl:value-of select="$message.rapport"/>
- </h2>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
-
- <xsl:template name="warning">
- <xsl:if test="$trop.anomalies eq 'true'">
- <table class="warning">
- <colgroup>
- <col/>
- <col width="1px"/>
- <col/>
- </colgroup>
- <tbody>
- <tr>
- <td>
- <img src="xemelios:/resource?rapport_warning.png"/>
- <span class="warning">Comme le flux comporte trop d'anomalies, toutes les anomalies ne figurent pas dans ce rapport.</span>
- </td>
- </tr>
- </tbody>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="parametres">
- <xsl:variable name="parametres"><xsl:copy-of select="/n:DocumentRapport/n:Params/n:Param"/></xsl:variable>
-
- <xsl:choose>
- <xsl:when test="$affichageParam = ''">
- <xsl:element name="a">
- <xsl:attribute name="href">xemelios:/query?docId=rapport&etatId=DonneesRapport&elementId=Rapport&collectivite=<xsl:value-of select="$siret"/>&budget=<xsl:value-of select="$budget.code"/>&path=[n:Id/@n:V='<xsl:value-of select="$id.rapport"/>']&xsl:param=(affichage,<xsl:value-of select="$affichage"/>)&xsl:param=(idControle,<xsl:value-of select="$idControle"/>)&xsl:param=(ancre,<xsl:value-of select="$ancre"/>)<xsl:choose><xsl:when test="$affichageParam = ''">&xsl:param=(affichageParam,1)</xsl:when><xsl:otherwise>&xsl:param=(affichageParam,)</xsl:otherwise></xsl:choose><xsl:if test="$ancre != ''">#<xsl:value-of select="$ancre"/></xsl:if></xsl:attribute>
- <h3>Paramètres <![CDATA[<]]></h3>
- </xsl:element>
-
- <table class="parametres">
- <colgroup>
- <col width="20%"/>
- <col width="1px"/>
- <col width="29%"/>
- <col width="2%"/>
- <col width="20%"/>
- <col width="1px"/>
- <col width="29%"/>
- </colgroup>
- <tbody>
- <xsl:for-each select="$parametres//n:Param">
- <xsl:variable name="pos" select="position()"/>
- <xsl:choose>
- <xsl:when test="($pos mod 2) > 0">
- <tr>
- <td><b><xsl:value-of select="$parametres/n:Param[$pos]/@n:Name"/></b></td>
- <td> </td>
- <td><xsl:value-of select="$parametres/n:Param[$pos]/@n:Value"/></td>
- <td> </td>
- <td><b><xsl:value-of select="$parametres/n:Param[$pos + 1]/@n:Name"/></b></td>
- <td> </td>
- <td><xsl:value-of select="$parametres/n:Param[$pos + 1]/@n:Value"/></td>
- </tr>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </tbody>
- </table>
- <br/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="a">
- <xsl:attribute name="href">xemelios:/query?docId=rapport&etatId=DonneesRapport&elementId=Rapport&collectivite=<xsl:value-of select="$siret"/>&budget=<xsl:value-of select="$budget.code"/>&path=[n:Id/@n:V='<xsl:value-of select="$id.rapport"/>']&xsl:param=(affichage,<xsl:value-of select="$affichage"/>)&xsl:param=(idControle,<xsl:value-of select="$idControle"/>)&xsl:param=(ancre,<xsl:value-of select="$ancre"/>)<xsl:choose><xsl:when test="$affichageParam = ''">&xsl:param=(affichageParam,1)</xsl:when><xsl:otherwise>&xsl:param=(affichageParam,)</xsl:otherwise></xsl:choose><xsl:if test="$ancre != ''">#<xsl:value-of select="$ancre"/></xsl:if></xsl:attribute>
- <h3>Paramètres <![CDATA[>]]></h3>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template name="style">
- <style type="text/css" media="all">
- body{
- font-family:verdana, sans-serif;
- font-size:12px;
- width:100%;
- }
-
- h1{
- text-align:center;
- font-size:16px;
- font-weight:bold;
- }
- h1 > a{
- font-size:14px;
- }
-
- #cache{
- display:none;
- }
-
- tr{
- height:18px;
- }
- tr td{
- border:none 1px #000000;
- }
-
- a:link{
- color:#00c;
- background:transparent
- }
- a:visited{
- color:#609;
- background:transparent
- }
- a:active{
- color:#c00;
- background:transparent
- }
- a:link img,
- a:visited img{
- border-style:none
- }
-
- table.entete,
- table.warning,
- table.parametres {
- width:100%;
- border-collapse: collapse;
- }
-
- .red {
- color:red;
- background:transparent
- }
- .warning {
- font-weight:bold;
- color:red;
- font-size:14px;
- }
- .bold {
- font-weight:bold;
- }
- .bordureBas {
- border-bottom: solid 1px #000000;
- }
- .bordureDroite {
- border-right: solid 1px #000000;
- }
- </style>
- <style type="text/css" media="print">
- @page {
- size:297mm 210mm;
- margins:10mm 10mm 10mm 10mm;
- }
- tr{
- page-break-inside:avoid;
- }
- </style>
- </xsl:template>
-</xsl:stylesheet>