I'm looking into using streaming validation and when looking at and running the svalidate script distributed with 2.0.0 I noticed that it returns valid for an xml missing required attributes as specified in the xsd.  Validating the same file using the XmlObject.validate() method catches those errors.  Is there something that needs to be specifically set in order to catch this kind of error?

For example, with the following fragment from an xsd:

...
<xs:element name="heading">
    <xs:complexType>
        <xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
</xs:element>
...

an element in the xml of:
<heading name="adsf"/>

will pass validation with svalidate, but fails with XmlObject.validate()  (which is what I'd want/expect).


Thanks,
Rob Eger
Local Matters, Inc.


Rob Eger
Senior Software Engineer
Local Matters, Inc.
 
1221 Auraria Parkway
Denver, CO  80204
[EMAIL PROTECTED]
www.localmatters.com
O 303-572-1122 x203
F 303-572-1123


Reply via email to