Hi Bruno,
I'm not sure if you're pointing to a more general problem, but in this case, you have radio buttons with 3 possible values: "1", "2", and "3". You say that the type is `xs:boolean`. And the thing is that, in XPath, "1" can be casted to a boolean (it corresponds to `true()`), however "2" and "3" can't be casted to a boolean, hence the error when you select the 2nd and 3rd radios, as the values for those aren't valid boolean values.
You can check this with:
'1' castable as xs:boolean ⇒ true()
'2' castable as xs:boolean ⇒ false()
'3' castable as xs:boolean ⇒ false()
But maybe this isn't the problem you were trying to show? In which case, could you share with us an example of that other issue?
‑Alex