[xsde-users] XSD/e and xsi:nil support?
Boris Kolpackov
boris at codesynthesis.com
Wed Feb 9 11:10:42 EST 2011
Hi Witek,
Witek Piet <travelwitek at gmail.com> writes:
> The only thing that bothers me about this approach is its maintainability,
> i.e. the enum has to be kept in sync with the data structure.
Yes, that's the drawback of this approach. The alternative would be to
do something like this (using optional elements/attributes):
<set>
<config>
<sampling_enable><value>true</value></sampling_enable>
</config>
</set>
<get>
<config>
<sampling_enable/>
</config>
</get>
Or, if your values are of simple types, you can do:
<set>
<config>
<sampling_enable value="true"/>
</config>
</set>
Boris
More information about the xsde-users
mailing list