<commit_before><!--~
  ~ Copyright (C) 2009 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
  -->
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
        xmlns:foo="http://orbeon.org/oxf/xml/foo"
        xmlns:ev="http://www.w3.org/2001/xml-events"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xbl="http://www.w3.org/ns/xbl">

    <xhtml:head>
        <xforms:model>
            <xforms:instance id="main-instance">
                <instance>
                    <age>35</age>
                    <secret>42</secret>
                    <textarea>The world is but a canvas for the imagination.</textarea>
                    <label>Hello, World!</label>
                    <date/>
                    <time/>
                    <date-time/>
                    <flavor>v c</flavor>
                    <carrier>fedex</carrier>
                    <country-name/>
                    <new-item>
                        <label>Key lime</label>
                        <value>lime</value>
                    </new-item>
                    <range>
                        <value>1</value>
                        <letter>A</letter>
                    </range>
                    <country/>
                </instance>
            </xforms:instance>

            <xforms:instance id="text-result">
                <text/>
            </xforms:instance>
            
            <xforms:instance id="instance-result">
                <text/>
            </xforms:instance>

            <xforms:submission id="submission-replace-none" mode="asynchronous"
                method="get" resource="http://www.google.com/"
                serialization="none"
                replace="none"/>

            <xforms:submission id="submission-replace-text" mode="asynchronous"
                method="get" resource="http://www.google.com/"
                serialization="none"
                replace="text" targetref="instance('text-result')"/>

            <xforms:submission id="submission-replace-instance" mode="asynchronous"
                method="get" resource="http://www.orbeon.com/ops/xforms-sandbox/service/zip-states"
                serialization="none" xxforms:cache="true"
                replace="instance" targetref="instance('instance-result')"/>

            <xforms:action ev:event="xforms-model-construct-done">
                <xforms:send submission="submission-replace-none"/>
                <xforms:send submission="submission-replace-text"/>
                <xforms:send submission="submission-replace-instance"/>
                <xxforms:join-submissions/>
            </xforms:action>

        </xforms:model>
    </xhtml:head>
    <xhtml:body>

        <xforms:submit submission="submission-replace-none">
            <xforms:label>Test replace="none"</xforms:label>
        </xforms:submit>

        <xforms:submit submission="submission-replace-text">
            <xforms:label>Test replace="text"</xforms:label>
        </xforms:submit>

        <xforms:submit submission="submission-replace-instance">
            <xforms:label>Test replace="instance"</xforms:label>
        </xforms:submit>

        <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>

    </xhtml:body>
</xhtml:html>
<commit_msg>Update to async submissions sample.<commit_after><!--~
  ~ Copyright (C) 2009 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
  -->
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
        xmlns:foo="http://orbeon.org/oxf/xml/foo"
        xmlns:ev="http://www.w3.org/2001/xml-events"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xbl="http://www.w3.org/ns/xbl">

    <xhtml:head>
        <xforms:model>
            <xforms:instance id="main-instance">
                <instance>
                    <age>35</age>
                    <secret>42</secret>
                    <textarea>The world is but a canvas for the imagination.</textarea>
                    <label>Hello, World!</label>
                    <date/>
                    <time/>
                    <date-time/>
                    <flavor>v c</flavor>
                    <carrier>fedex</carrier>
                    <country-name/>
                    <new-item>
                        <label>Key lime</label>
                        <value>lime</value>
                    </new-item>
                    <range>
                        <value>1</value>
                        <letter>A</letter>
                    </range>
                    <country/>
                </instance>
            </xforms:instance>

            <xforms:instance id="text-result">
                <text/>
            </xforms:instance>
            
            <xforms:instance id="instance-result-1">
                <dummy/>
            </xforms:instance>
            
            <xforms:instance id="instance-result-2">
                <dummy/>
            </xforms:instance>

            <xforms:submission id="replace-none" mode="asynchronous"
                method="get" resource="http://www.google.com/"
                serialization="none"
                replace="none"/>

            <xforms:submission id="replace-text" mode="asynchronous"
                method="get" resource="http://www.google.com/"
                serialization="none"
                replace="text" targetref="instance('text-result')"/>

            <xforms:submission id="replace-instance-1" mode="asynchronous"
                method="get" resource="http://www.orbeon.com/ops/xforms-sandbox/service/zip-states"
                serialization="none" xxforms:cache="false"
                replace="instance" targetref="instance('instance-result-1')">
                <xforms:send ev:event="xforms-submit-done" submission="replace-instance-2"/>
            </xforms:submission>

            <xforms:submission id="replace-instance-2" mode="asynchronous"
                method="get" resource="http://www.orbeon.com/ops/xforms-sandbox/service/zip-states"
                serialization="none" xxforms:cache="false"
                replace="instance" targetref="instance('instance-result-2')"/>

            <xforms:action ev:event="xforms-model-construct-done">
                <xforms:send submission="replace-none"/>
                <xforms:send submission="replace-text"/>
                <xforms:send submission="replace-instance-1"/>
                <xxforms:join-submissions/>
            </xforms:action>

        </xforms:model>
    </xhtml:head>
    <xhtml:body>

        <xforms:submit submission="replace-none">
            <xforms:label>Test replace="none"</xforms:label>
        </xforms:submit>

        <xforms:submit submission="replace-text">
            <xforms:label>Test replace="text"</xforms:label>
        </xforms:submit>

        <xforms:submit submission="replace-instance-1">
            <xforms:label>Test replace="instance"</xforms:label>
        </xforms:submit>

        <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>

    </xhtml:body>
</xhtml:html>

{'fraction_non_alphanumeric': 0.13290689410092396, 'fraction_numerical': 0.008647239990523572, 'mean_word_length': 1.826581854703716, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 19, 'xml': 24}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6647089', 'n_tokens_mistral': 2468, 'n_tokens_neox': 2278, 'n_words': 433}