On 14 Apr 2004, at 10:08, Gevorkov, Robert wrote:
I have an element called 'workSince' declared in my schema with
nillable="true" attribute. It is also of type="xs:positiveInteger" and this is a problem.
I have the follow XSD definition:
Nillable is processed by castor - but xs:positiveInteger, as a type, requires a value of 1 if the value is present at all. You're getting caught by the difference between what's required by the schema, and what you're OK with setting in the object. Setting nillable to true does not permit 0 when doing XML validation; that's a mapping directive - setting the type of xs:positiveInteger ensures that.
If you really want 0, that type should be nonNegativeInteger, which is 0..n, instead of positiveInteger, which, by definition, is 1..n.
I think. Someone yell at me if I'm way off base on that. :)
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
