<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<?xsltforms-options debug="yes"?>
<html xmlns="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>dessins form</title>




 <STYLE type="text/css">

   div.image {border:solid 1px grey; margin:1px;padding:1px;}

   div.prop1 {border:solid 0px grey; margin:5px;padding:5px;background-color:#F0F0F0;font-weight:bold;}


</STYLE>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<SCRIPT>
$(document).ready(function(){
  
 })
</SCRIPT>


		<xf:model>
			
			<xf:instance src="dessins.xml" id="dessins"/>
			
			<xf:bind nodeset="name" required="true()" type="xsd:Name"/>
			<xf:submission id="s01" method="post" show="new" replace="all" action="xsltforms/txs.php?exec=beautify.txs">
				<xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message>
			</xf:submission>
			<xf:submission id="s02" method="xml-urlencoded-post" replace="none" action="xsltforms/txs.php?exec=returnasattachment.txs&amp;file=mycontact.xml">
				<xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message>
			</xf:submission>


         <xf:submission id="read-from-file" method="get"
             action="dessins.xml" replace="instance" instance="data-instance" />
         <xf:submission id="save-to-file" method="put"
             action="dessins.xml" replace="instance" instance="data-instance" />


			
			<xf:submission id="s03" method="post"  action="traitement_dessins.php">
				<xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message>
			</xf:submission>      

		</xf:model>






	</head>
	<body>
	(Réalisé avec <a href="http://www.agencexml.com/xsltforms"><b>XSLTForms</b></a>)<br/>


		<h1 attri="test">Dessins</h1>

	<xf:repeat id="repeat_image" nodeset="image" appearance="compact">

<div class="image">

	Image <xf:input ref="@ref">
			<xf:label>Ref image </xf:label>
			<xf:hint>Saisir la référence de l'image</xf:hint>
		</xf:input>
		
	<xf:repeat id="repeat_objet" nodeset="objet" appearance="compact">


		<xf:input ref="@nom" class="themes">
			<xf:label>Nom </xf:label>
			<xf:hint>Saisir le nom de l'objet</xf:hint>
		</xf:input>

		<xf:input ref="@x" class="themes">
			<xf:label>x </xf:label>
			<xf:hint>Saisir la coordonnée X de l'objet</xf:hint>
		</xf:input>

		<xf:input ref="@y" class="themes">
			<xf:label>y </xf:label>
			<xf:hint>Saisir la coordonnée Y de l'objet</xf:hint>
		</xf:input>

		<xf:input ref="@ratio" class="themes">
			<xf:label>ratio </xf:label>
			<xf:hint>Saisir le ratio de l'objet</xf:hint>
		</xf:input>

		</xf:repeat>

			 <br />
			 <xf:output value="objet/@nom">
					<xf:label>Output: </xf:label>
			 </xf:output>
		
</div>

	</xf:repeat>




		









			<xf:submit submission="s01">
				<xf:label>View</xf:label>
			</xf:submit>
			<xf:submit submission="s02">
				<xf:label>Save As</xf:label>
			</xf:submit>

			<xf:submit submission="s03">
				<xf:label>Transmet</xf:label>
			</xf:submit> 

      <xf:submit submission="read-from-file">
         <xf:label>Reload</xf:label>
      </xf:submit>
      <xf:submit submission="save-to-file">
         <xf:label>Save</xf:label>
      </xf:submit>


			<xf:trigger>
				<xf:label>Reset</xf:label>
				<xf:reset ev:event="DOMActivate"/>
			</xf:trigger>
		</body>
	</html>
