<!--
	Copyright (C) 2004 Orbeon, Inc.
	
	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU Lesser General Public License as published by the Free Software Foundation; either version
	2.1 of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
	without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	See the GNU Lesser General Public License for more details.
	
	The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
	schema="oxf:/FormationOrbeon/TestMigration/schema/Schema.xsd"
	xmlns:ex="http://exslt.org/math">
	<xforms:instance>
<!--schema="oxf:/FormationOrbeon/TestMigration/schema/Schema.xsd"-->
		<form>
		    <id>0</id>
			<show-errors />
			<action />
			<authentification>
				<login />
				<password />
				<repassword>ss</repassword>
				<difference />
				<level />
			</authentification>
			<info-general>
				<cin />
				<cne />
				<nom />
				<prenom />
				<date-naissance />
				<email />
				<site-web />
				<telephone />
				<adresse />
				<situation-familiale />
			</info-general>
			<formations>
				<fonction-actuelle />
				<diplomes>
					<diplome>
						<intitule />
						<annee />
						<mention />
					</diplome>
				</diplomes>
			</formations>
		</form>

	</xforms:instance>
	<xforms:submission method="post" />
	
	<xforms:bind nodeset="/form/info-general/cne" relevant="/form/authentification/level = 'etudiant'  " />

     <xforms:bind nodeset="/form/authentification/difference"
		constraint="if ( /form/authentification/password!=/form/authentification/repassword  and /form/action !='verifierLogin') then false() else true()" /> 
	<xforms:bind
		nodeset="/form/formations/diplomes/diplome[position()=last()]"
		relevant="false()" />
	
</xforms:model>



