<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- orgUnit.v01.xsl contient tous les templates d'affichage des informations d'une personne (balise person) de CDM-fr v2 -->

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:ns2="http://cdm-fr.fr/2011/CDM-frSchema"
	exclude-result-prefixes="xsl xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xhtml="http://www.w3.org/1999/xhtml">

	<!-- FICHIERS INCLUDE UTILISEES -->
	<!-- <xsl:include href="person/personID.v01.xsl" />
	<xsl:include href="person/name.v01.xsl" />
	<xsl:include href="person/title.v01.xsl" />
	<xsl:include href="commun/sectionCNU.v01.xsl" /> -->


	<!-- AJOUT ROT template description -->
	<xsl:template match="refOrgUnit | ns2:refOrgUnit">
		<li><xsl:call-template name="tCommunGestionLibelle">
				<xsl:with-param name="pIdent" select="'libEtablissementDeReference'"/>
			</xsl:call-template><xsl:call-template name="tOrgUnitName"/></li>
	</xsl:template>
	
	<xsl:template name="tOrgUnitName">
		<!-- <xsl:value-of select="/CDM/orgUnit[1]/orgUnitName/text[@language=$_lang or not(@language)]"/> -->
		<xsl:value-of select="/CDM/orgUnit[1]/orgUnitName"/>
	</xsl:template>

	<xsl:template name="tOrgUnitSecondName">
		<xsl:param name="pSecondNameNature" select="'patronyme'"/>
		<xsl:value-of select="/CDM/orgUnit[1]/ns2:orgUnitSecondName[@secondNameNature=$pSecondNameNature]/ns2:secondName/ns2:text[@language=$_lang or not(@language)]"/>
	</xsl:template>

	<xsl:template name="tOrgUnitCode">
		<xsl:param name="pCodeSet" select="'codeUAI'"/>
		<xsl:value-of select="/CDM/orgUnit[1]/orgUnitCode[@codeSet=$pCodeSet]"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitKind">
		<xsl:apply-templates select="/CDM/orgUnit[1]/orgUnitKind[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitWebLinkHref">
		<xsl:apply-templates select="/CDM/orgUnit[1]/ns2:webLink/href"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitDescription">
		<xsl:apply-templates select="/CDM/orgUnit[1]/orgUnitDescription[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitIntroduction">
		<xsl:apply-templates select="/CDM/orgUnit[1]/orgUnitIntroduction[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>

	<xsl:template name="tOrgUnitAdmissionInfo">
		<xsl:call-template name="tOrgUnitAdmissionInfoAdmissionDescription"/>
		<!-- ajouter d'autres attributs -->
	</xsl:template>

	<xsl:template name="tOrgUnitAdmissionInfoAdmissionDescription">
		<xsl:apply-templates select="/CDM/orgUnit[1]/admissionInfo/ns2:admissionDescription[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>

	<xsl:template name="tOrgUnitRegistrationDeadline">
		<xsl:param name="pLibelleDateDeadline" />
		<xsl:if test="not($pLibelleDateDeadline='')">
			<xsl:value-of select="$pLibelleDateDeadline"/> <xsl:value-of select="/CDM/orgUnit[1]/admissionInfo/registrationDeadline[@blockLang=$_lang or not(@blockLang)]/@date"/>
		</xsl:if>
		<xsl:apply-templates select="/CDM/orgUnit[1]/admissionInfo/registrationDeadline[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>

	<xsl:template name="tOrgUnitCancelDeadline">
		<xsl:param name="pLibelleDateCancel" />
		<xsl:if test="not($pLibelleDateCancel='')">
			<xsl:value-of select="$pLibelleDateCancel"/> <xsl:value-of select="/CDM/orgUnit[1]/admissionInfo/cancelDeadline[@blockLang=$_lang or not(@blockLang)]/@date"/>
		</xsl:if>
		<xsl:apply-templates select="/CDM/orgUnit[1]/admissionInfo/cancelDeadline[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitRegulations">
		<xsl:apply-templates select="/CDM/orgUnit[1]/regulations[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitExpensesInfoBlockType">
		<xsl:call-template name="tExpensesInfoBlockType">
			<xsl:with-param name="pNode" select="/CDM/orgUnit[1]/"/>
		</xsl:call-template>
	</xsl:template>

	<xsl:template name="tOrgUnitStudentFacilities">
		<xsl:apply-templates select="/CDM/orgUnit[1]/studentFacilities[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitUniversalAdjustment">
		<xsl:apply-templates select="/CDM/orgUnit[1]/universalAdjustment[@blockLang=$_lang or not(@blockLang)]/node()"/>
	</xsl:template>

	<xsl:template name="tOrgUnitQualiteSignataireDiplome">
		<xsl:apply-templates select="/CDM/orgUnit[1]/infoBlock"/>
	</xsl:template>
	
	<xsl:template name="tOrgUnitContactData">
		<xsl:apply-templates select="/CDM/orgUnit[1]/contacts/contactData"/>
	</xsl:template>
	
	
	<!-- AJOUT ROT template description -->

</xsl:stylesheet>