Hey, Andres, welcome.
How odd that the format text box is disabled.
When I look at the XSL for a form that has a control with the format defined, the format is in two places. In the when test (as shown in your post) but also in the xd:datafmt attribute of the span tag for the control. The quotes are encoded (").
So, in my sample, which is formatted a bit differently than yours, prior to the xsl:when, I have this:
<span hideFocus="1" class="xdTextBox xdBehavior_Formatting" title="" contentEditable="true" tabIndex="0" xd:CtrlId="CTRL2" xd:xctname="PlainText" xd:binding="@type" xd:datafmt=""number","numDigits:0;negativeOrder:1;"" xd:boundProp="xd:num" style="WIDTH: 130px">
I wonder if you also need to adjust the number format there?