SAX2Count works fine for me. And -s -v should be enough for validating
against schema. It would help if you could post your .xml and .xsd files.

Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
[EMAIL PROTECTED]



                                                                                
                                   
                    [EMAIL PROTECTED]                                           
                                      
                    con.com              To:     [EMAIL PROTECTED]              
                        
                                         cc:                                    
                                   
                    03/22/2001           Subject:     how to use schema 
validation?                                
                    06:22 PM                                                    
                                   
                    Please respond                                              
                                   
                    to                                                          
                                   
                    xerces-j-user                                               
                                   
                                                                                
                                   
                                                                                
                                   



I'm attempting to validate documents against a schema using Xerces 1.3.0
with no success. In fact I am unable to validate sample documents using
the sample programs.

It seems the noNamespaceSchemaLocation is not being recognized,
hence schema validation can't be performed. I must be doing something
fundamentally wrong but I can't spot it.

Here, for instance, is what happens when I run SAX2Count on the
personal-schema
example:

(D:)Xerces-J-src.1.3.0/xerces-1_3_0/data>java sax.SAX2Count -s -v
personal-schema.xml
[Error] personal-schema.xml:3:50: Element type "personnel" must be
declared.
[Error] personal-schema.xml:3:50: Attribute "xsi:noNamespaceSchemaLocation"
must be declared for element type "personnel
".
[Error] personal-schema.xml:5:26: Element type "person" must be declared.
[Error] personal-schema.xml:5:26: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:6:11: Element type "name" must be declared.
[Error] personal-schema.xml:6:19: Element type "family" must be declared.
[Error] personal-schema.xml:6:41: Element type "given" must be declared.
[Error] personal-schema.xml:7:12: Element type "email" must be declared.
[Error] personal-schema.xml:8:86: Element type "link" must be declared.
[Error] personal-schema.xml:8:86: Attribute "subordinates" must be declared
for element type "link".
[Error] personal-schema.xml:11:27: Element type "person" must be declared.
[Error] personal-schema.xml:11:27: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:12:11: Element type "name" must be declared.
[Error] personal-schema.xml:12:19: Element type "family" must be declared.
[Error] personal-schema.xml:12:43: Element type "given" must be declared.
[Error] personal-schema.xml:13:12: Element type "email" must be declared.
[Error] personal-schema.xml:14:31: Element type "link" must be declared.
[Error] personal-schema.xml:14:31: Attribute "manager" must be declared for
element type "link".
[Error] personal-schema.xml:17:27: Element type "person" must be declared.
[Error] personal-schema.xml:17:27: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:18:11: Element type "name" must be declared.
[Error] personal-schema.xml:18:19: Element type "family" must be declared.
[Error] personal-schema.xml:18:43: Element type "given" must be declared.
[Error] personal-schema.xml:19:12: Element type "email" must be declared.
[Error] personal-schema.xml:20:31: Element type "link" must be declared.
[Error] personal-schema.xml:20:31: Attribute "manager" must be declared for
element type "link".
[Error] personal-schema.xml:23:29: Element type "person" must be declared.
[Error] personal-schema.xml:23:29: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:24:11: Element type "name" must be declared.
[Error] personal-schema.xml:24:19: Element type "family" must be declared.
[Error] personal-schema.xml:24:43: Element type "given" must be declared.
[Error] personal-schema.xml:25:12: Element type "email" must be declared.
[Error] personal-schema.xml:26:31: Element type "link" must be declared.
[Error] personal-schema.xml:26:31: Attribute "manager" must be declared for
element type "link".
[Error] personal-schema.xml:29:28: Element type "person" must be declared.
[Error] personal-schema.xml:29:28: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:30:11: Element type "name" must be declared.
[Error] personal-schema.xml:30:19: Element type "family" must be declared.
[Error] personal-schema.xml:30:43: Element type "given" must be declared.
[Error] personal-schema.xml:31:12: Element type "email" must be declared.
[Error] personal-schema.xml:32:31: Element type "link" must be declared.
[Error] personal-schema.xml:32:31: Attribute "manager" must be declared for
element type "link".
[Error] personal-schema.xml:35:28: Element type "person" must be declared.
[Error] personal-schema.xml:35:28: Attribute "id" must be declared for
element type "person".
[Error] personal-schema.xml:36:11: Element type "name" must be declared.
[Error] personal-schema.xml:36:19: Element type "family" must be declared.
[Error] personal-schema.xml:36:43: Element type "given" must be declared.
[Error] personal-schema.xml:37:12: Element type "email" must be declared.
[Error] personal-schema.xml:38:31: Element type "link" must be declared.
[Error] personal-schema.xml:38:31: Attribute "manager" must be declared for
element type "link".
personal-schema.xml: 351 ms (37 elems, 13 attrs, 0 spaces, 268 chars)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to