You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Igor Bukanov <ml...@igor.fastmail.fm> on 2004/11/11 13:09:07 UTC

SchemaTypeLoader.parse ignores XmlOptions.setValidateOnSet() ?

It seems that in xmlbeans 1.0.3 after

XmlObject xmlObject = schemaTypeLoader.parse(xmlSource, schemaType,
	new XmlOptions.setValidateOnSet());
	
xmlObject still can be made invalid. For example, I can set the 
attribute to the empty string via xmlCursor.setAttributeText even if it 
was declared with:

   <xs:simpleType name='non-empty-token'>
     <xs:restriction base='xs:token'>
       <xs:minLength value='1'/>
     </xs:restriction>
   </xs:simpleType>

After such assignments xmlObject.validate returns false but it would be 
nice if the library woud throw an exception immediately.

Do I miss something?

Regards, Igor

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