[xsd-users] default value xsd and parsing
Benjamin Schindler
bschindler at inf.ethz.ch
Fri Feb 26 09:19:16 EST 2010
Hi
I have the following thing I'd like to achieve:
<xs:complexType name="ServerConfiguration_t">
<xs:sequence>
<xs:element name="port" type="xs:int" default="5454"/>
</xs:sequence>
</xs:complexType>
(I tried the same with xs:all instead of sequence)
When I get an xml that doesn't have the port attribute, validating the
xml fails. But I'd expect that I get an object without the xsd::Optional
template which has the default value 5454 if the xml does not have it.
Is this somehow possible?
Benjamin
More information about the xsd-users
mailing list