When executed with the  -s  -v switch the SAX2Count program executes

           parser.setFeature( "http://xml.org/sax/features/validation";,
true);
            parser.setFeature( "http://xml.org/sax/features/namespaces";,
true );
            parser.setFeature
( "http://apache.org/xml/features/validation/schema";,  true );

which I believe sould turn on support for schema validation. Are there
properties
as well as features I need to modify? Where do I find them?

TIA




                                                                                
                    
                    [EMAIL PROTECTED]                                           
                     
                    oyease.com              To:     [EMAIL PROTECTED]           
         
                                            cc:                                 
                    
                    03/22/01 03:32          Subject:     RE: how to use schema 
validation?          
                    PM                                                          
                    
                    Please respond                                              
                    
                    to xerces-j-user                                            
                    
                                                                                
                    
                                                                                
                    






You should turn on validation and schema support properties

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 22, 2001 6:23 PM
To: [EMAIL PROTECTED]
Subject: how to use schema validation?

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