Xforms: how to prevent xxforms: the default value from excessive user input

I have a drop-down list to display the status, which can be enabled (true) or Disabled (false). Here is my xml instance.

<?xml version="1.0" encoding="UTF-8"?>
    <page>
        <file-name></file-name>
        <status></status>
    </page>

By default, the status should be true. So I set it in binding as follows.

<xforms:bind nodeset="./status" xxforms:default="true()" />

When the user selects "Disabled" in the drop-down list, the status should be saved as false. Here is the xml that is saved when the form is saved.

<page>
    <file-name>StatusDisabled.xml</file-name>
    <status>false</false>
</page>

When I open the form in edit mode, this is the xml that I get in the widgets of the XML inspector.

<page>
    <file-name>StatusDisabled.xml</file-name>
    <status>true></status>
</page>

Status gets true due to xxforms: by default, although xml is saved with a false status value.

How can i fix this?

Here is xhtml:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">

    <head>
        <title>XForms Default</title>

        <xforms:model>
            <xforms:instance id="instance">
                <page>
                    <name xmlns=""/>    
                    <status xmlns=""/>
                </page>
            </xforms:instance>

            <xforms:instance id="status-instance">
                <items>
                    <item label="Enabled" value="true" xmlns=""/>
                    <item label="Disabled" value="false" xmlns=""/>
                </items>
            </xforms:instance>

            <xforms:bind nodeset="instance('instance')">
                <xforms:bind nodeset="./status" xxforms:default="true()" />
            </xforms:bind>

        </xforms:model>
    </head>
    <body>
        <p>
            <xforms:input ref="instance('instance')/name" incremental="true">
                <xforms:label>Please enter your name:</xforms:label>
            </xforms:input>
        </p>
        <p>
            <xforms:select1 ref="instance('instance')/status" appearance="minimal" incremental="true">
                <xforms:label>Please select status:</xforms:label>
                <xforms:itemset nodeset="instance('status-instance')/item">
                    <xforms:label ref="./@label"/>
                    <xforms:value ref="./@value"/>
                </xforms:itemset>
            </xforms:select1> 
        </p>
    </body>
</html>
+3
1

, . xxforms:default .

+1

Source: https://habr.com/ru/post/1755055/