<?xml-stylesheet type="text/xsl" href="/exist/rest/db/apps/xsltforms/xsltforms.xsl"?><?xsltforms-options debug="yes"?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Contact</title>
        <xf:model xmlns:xf="http://www.w3.org/2002/xforms">
            <xf:instance>
                <person xmlns="">
                    <name>Javier</name>
                    <birthdate>1979-08-31</birthdate>
                    <gender>M</gender>
                    <telephones>
                        <telephone type="mobile">666005000</telephone>
                        <telephone type="home">986888888</telephone>
                    </telephones>
                </person>
            </xf:instance>
            <xf:bind nodeset="name" required="true()" type="xsd:Name"/>
            <xf:bind nodeset="birthdate" type="xsd:date"/>
            <xf:submission id="s01" method="post" show="new" replace="all" action="xsltforms/txs.php?exec=beautify.txs">
                <xf:message xmlns:ev="http://www.w3.org/2001/xml-events" 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 xmlns:ev="http://www.w3.org/2001/xml-events" level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message>
            </xf:submission>
        </xf:model>
        <style type="text/css">
    body {
        margin-left:2em;
        margin-top:2em;
        font-size:110%;
    }
    input {
        margin-left:1em;
        margin-right:1em;
    }
    #xsltforms_console {
        margin-top:3em;
        padding-top:1em;
        font-size:75%;
        }
    iframe {
        display:none;
    }
    #xsltforms_debug {
        padding-bottom:1em;
    }
    
    .btn {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #F5F5F5;
    background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6);
    background-repeat: repeat-x;
    border-bottom-color: #A2A2A2;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-image-outset: 0 0 0 0;
    border-image-repeat: stretch stretch;
    border-image-slice: 100% 100% 100% 100%;
    border-image-source: none;
    border-image-width: 1 1 1 1;
    border-left-color-ltr-source: physical;
    border-left-color-rtl-source: physical;
    border-left-color-value: #BBBBBB;
    border-left-style-ltr-source: physical;
    border-left-style-rtl-source: physical;
    border-left-style-value: solid;
    border-left-width-ltr-source: physical;
    border-left-width-rtl-source: physical;
    border-left-width-value: 1px;
    border-right-color-ltr-source: physical;
    border-right-color-rtl-source: physical;
    border-right-color-value: #BBBBBB;
    border-right-style-ltr-source: physical;
    border-right-style-rtl-source: physical;
    border-right-style-value: solid;
    border-right-width-ltr-source: physical;
    border-right-width-rtl-source: physical;
    border-right-width-value: 1px;
    border-top-color: #BBBBBB;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-top-style: solid;
    border-top-width: 1px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #333333;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    margin-top:1em;
    margin-bottom:1em;
    padding-bottom: 4px;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 4px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    vertical-align: middle;
    }
    .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] {
    background-color: #E6E6E6;
    color: #333333;
    }
    .btn:active, .btn.active {
    }
    .btn:first-child {
    }
    .btn:hover {
    -moz-text-blink: none;
    -moz-text-decoration-color: -moz-use-text-color;
    -moz-text-decoration-line: none;
    -moz-text-decoration-style: solid;
    background-color: #E6E6E6;
    background-position: 0 -15px;
    color: #333333;
    transition-delay: 0s;
    transition-duration: 0.1s;
    transition-property: background-position;
    transition-timing-function: linear;
    }
    .btn:focus {
    outline-color: #333333;
    outline-offset: -2px;
    outline-style: dotted;
    outline-width: thin;
    }
    .btn.active, .btn:active {
    background-color: #E6E6E6;
    background-image: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
    outline-color: -moz-use-text-color;
    outline-style: none;
    outline-width: 0;
    }
    a {
    text-decoration:none;
    color: #0088CC;
    }
    a:hover {
    -moz-text-blink: none;
    -moz-text-decoration-color: -moz-use-text-color;
    -moz-text-decoration-line: underline;
    -moz-text-decoration-style: solid;
    color: #005580;
    }
    .xforms-value {margin-left:1em;}
    .description {
        color: gray;
        margin-top:2em;
        font-size: 80%;}
</style>
    </head>
    <body>
        <div class="source">
            <div class="toolbar">
                <a class="btn" href="/exist/apps/eXide/index.html?open=/db/apps/XSLTForms-Demo/data/contact.xml" target="eXide" data-type="XML" title="Opens the form in eXide.">Open form in eXide</a>
            </div>
        </div>
        <h2>Contact</h2>
        <group xmlns="http://www.w3.org/2002/xforms">
            <input ref="name">
                <label>Name</label>
            </input>
            <select1 ref="gender">
                <label>Gender</label>
                <item>
                    <label>Male</label>
                    <value>M</value>
                </item>
                <item>
                    <label>Female</label>
                    <value>F</value>
                </item>
            </select1>
            <input ref="birthdate">
                <label>Birth date</label>
            </input>
            <group>
                <label>Telephones</label>
                <repeat id="repeat" nodeset="telephones/telephone" appearance="compact">
                    <select1 ref="@type" appearance="minimal">
                        <label>Type</label>
                        <item>
                            <label>Home</label>
                            <value>home</value>
                        </item>
                        <item>
                            <label>Mobile</label>
                            <value>mobile</value>
                        </item>
                        <item>
                            <label>Company</label>
                            <value>company</value>
                        </item>
                    </select1>
                    <input ref=".">
                        <label>Number</label>
                    </input>
                    <trigger>
                        <label>X</label>
                        <delete xmlns:ev="http://www.w3.org/2001/xml-events" nodeset="." at="1" if="count(//telephone) &gt; 1" ev:event="DOMActivate"/>
                    </trigger>
                </repeat>
                <trigger>
                    <label>New</label>
                    <insert xmlns:ev="http://www.w3.org/2001/xml-events" nodeset="telephones/telephone" at="index('repeat')" position="after" ev:event="DOMActivate"/>
                </trigger>
            </group>
        </group>
        <!--<xf:submit submission="s01">
            <xf:label>View</xf:label>
        </xf:submit>-->
        <!--<xf:submit submission="s02">
            <xf:label>Save As</xf:label>
        </xf:submit>-->
        <xf:trigger xmlns:xf="http://www.w3.org/2002/xforms">
            <xf:label>Reset</xf:label>
            <xf:reset xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="DOMActivate"/>
        </xf:trigger>
        <div xmlns="" class="description">
            <description/>
        </div>
    </body>
</html>