<?xml version="1.0" encoding="iso-8859-1"?>
<?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>Trigger style</title>

	<style type="text/css">
	  body { font-family: sans-serif}
	  label { display: inline-block; width: 3em; margin: 0 1em; text-align: right }
          .xforms-repeat-item-selected { background: yellow}
	</style> 

	<xf:model>
   		<xf:instance><data xmlns=""><name>John Smith</name></data></xf:instance>
	</xf:model>
</head>
<body>
    <xf:switch>
       <xf:case id="showName">
	  <xf:trigger appearance="minimal">
	     <xf:label>Name: <xf:output ref="name"/></xf:label>
	     <xf:toggle case="editName" ev:event="DOMActivate"/>
	  </xf:trigger>
       </xf:case>
       <xf:case id="editName">
	  <xf:input ref="name">
	      <xf:label>Name:</xf:label>
	      <xf:toggle case="showName" ev:event="DOMFocusOut"/>
	  </xf:input>
       </xf:case>
    </xf:switch>
</body>
</html>

