Re: [Xsltforms-support] Binding to optional element
Brought to you by:
alain-couthures
|
From: Tambet M. <tam...@gm...> - 2010-01-20 08:54:23
|
Micah Dubinko wrote:
> Thanks Tambet,
>
> Looks like a good direction to pursue.
>
> In the case where the default selection (no element) gets saved and then the form is reopened, in other words when the instance is
> <root/>
>
> How do you make it work (since the binding to /root/format goes nowhere)?
>
Good question. I don't have solution for that. In case of wsdl2xforms we
submit the instance to web service and never retrieve it.
Would xsi:nil attribute give you the same result? Something like this:
<xf:instance>
<root>
<format xsi:nil="false">xml</format>
</root>
</xf:instance>
<xf:bind nodeset="/root/format/@xsi:nil" calculate=".. = ''"/>
If I'm correct, Chiba even sets xsi:nil automatically for you, if you
happen to have that attribute.
I understand, that this not exactly "missing element" feature that you
needed, but maybe the target application handles the missing element and
xsi:nil="true" element the same way?
Tambet
|