﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
	<head>
		<title>Contrainte</title>
		<style type="text/css">
			body { font-family: sans-serif}
			label { display: inline-block; width: 10em; margin: 0 1em; text-align: right }
		</style> 
		<model xmlns="http://www.w3.org/2002/xforms">
			<instance>
				<donnees xmlns="">
					<naissance/>
					<deces/>
					<dureedevie/>
				</donnees>
			</instance>
			<bind nodeset="deces" constraint=". &gt;= ../naissance"/>
			<bind nodeset="dureedevie" readonly="true()" calculate="../deces - ../naissance"/>
		</model>
	</head>
	<body>
		<group xmlns="http://www.w3.org/2002/xforms">
			<input incremental="true" ref="naissance"><label>Année de naissance :</label></input><h:br/>
			<input incremental="true" ref="deces"><label>Année du décès :</label></input><h:br/>
			<output ref="dureedevie"><label>Durée de vie:</label></output>
			<br/>
		</group>
	</body>
</html>

