You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Diego García González <di...@tid.es> on 2007/04/10 12:57:45 UTC

Validation issue

Hi. I need to validate an XML instance against a XSD before parsing. I 
use the validate() function with no XmlOptions.
The validation seems to work ok, except for a detail: if I remove some 
mandatory attributes (marked with use="required" in the XSD) from the 
XML, the validate() function still returns true. How can I solve that issue?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Validation issue

Posted by Jacob Danner <ja...@gmail.com>.
How are you trying to validate without parsing?

If you are doing something like:
XmlObject.Factory.parse(<yourContent>).validate();
then this is expected behavior as you are NOT validating against a type.
-Jacob Danner


On 4/10/07, Diego García González <di...@tid.es> wrote:
> Hi. I need to validate an XML instance against a XSD before parsing. I
> use the validate() function with no XmlOptions.
> The validation seems to work ok, except for a detail: if I remove some
> mandatory attributes (marked with use="required" in the XSD) from the
> XML, the validate() function still returns true. How can I solve that issue?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org