Login  Register

Re: Re: Re: Schema validation for XSD:int

Posted by Erik Bruchez on Jun 23, 2009; 2:47am
URL: https://discuss.orbeon.com/Schema-validation-for-XSD-int-tp44183p44189.html

What I was thinking was that if the schema says the field is nillable,  
and xsi:nil="true" is present on the element, then validation should  
work.

I haven't yet tried if our validator is happy with xsi:nil="true", but  
if so, you could add those attributes on all nillable elements, and  
then set xsi:nil to true or false with a calculate depending on  
whether the value is empty or not.

-Erik

On Jun 21, 2009, at 5:16 PM, Alessandro Vernet wrote:

>
> If your schema says those nodes have to be of type xs:integer, if  
> you leave
> the nodes empty they won't be valid according to the schema. If it  
> should be
> OK for those nodes to be empty, then the schema needs to be changed.  
> I don't
> really see another way around it.
>
> Alex
>
>
> TirupatiReddy wrote:
>>
>> I have nillable="true" for all the xs:integer elements. But it is  
>> showing
>> the validation error if we don't enter any value for those elements.
>>
>>
>>
>> Erik Bruchez wrote:
>>>
>>> If any validation constraint fails for a node, then that node is
>>> marked as invalid. This is as per the XForms specification.
>>>
>>> Do these elements have xsi:nillable in the schema?
>>>
>>> -Erik
>>>
>>> On Jun 12, 2009, at 2:10 PM, TirupatiReddy wrote:
>>>
>>>>
>>>> Thanks for your suggestion. But the point is I can't change the
>>>> schema. Right
>>>> now for the temporary fix, I am putting zero by default for integer
>>>> elements. Is there any way that xforms:bind validation overwrites
>>>> the schema
>>>> validation?
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Schema-validation-for-XSD%3Aint-tp23968552p24006136.html
>>>> Sent from the ObjectWeb OPS - Users mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email]
>>>> mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>> --
>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>> http://www.orbeon.com/
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]  
>>> mailing
>>> list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>
>
> -----
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
> --
> View this message in context: http://www.nabble.com/Schema-validation-for-XSD%3Aint-tp23968552p24140230.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws