You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Allen Brookes <ab...@roguewave.com> on 2004/02/13 18:17:45 UTC

Problem with validating schemas

Hi,

I'm trying to validate a schema using Xerces-J but seem to be doing
something wrong.  I tried using the Counter example with this schema:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="test"
        xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
        xsi:schemaLocation=
                        "http://www.w3.org/2001/XMLSchema
                         http://www.w3.org/2001/XMLSchema.xsd">
    <element name="fullName" type="string"/>
</schema>

using the call

java dom.Counter -s -f test.xsd

and I get

[Error] test.xsd:7:65: cvc-elt.1: Cannot find the declaration of element
'schema'.
test.xsd: 651;30;0 ms (2 elems, 6 attrs, 0 spaces, 6 chars)

Shoudn't this work?

Thanks,
Allen

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


Re: Problem with validating schemas

Posted by Neil Delima <nd...@ca.ibm.com>.




Hi Allen,

In you instance document try changing
   xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
to
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"





                                                                                                                                       
                      Allen Brookes                                                                                                    
                      <abrookes@roguewa        To:       "'xerces-j-user@xml.apache.org'" <xe...@xml.apache.org>               
                      ve.com>                  cc:                                                                                     
                                               Subject:  Problem with validating schemas                                               
                      02/13/2004 12:17                                                                                                 
                      PM                                                                                                               
                      Please respond to                                                                                                
                      xerces-j-user                                                                                                    
                                                                                                                                       



Hi,

I'm trying to validate a schema using Xerces-J but seem to be doing
something wrong.  I tried using the Counter example with this schema:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="test"
        xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
        xsi:schemaLocation=
                        "http://www.w3.org/2001/XMLSchema
                         http://www.w3.org/2001/XMLSchema.xsd">
    <element name="fullName" type="string"/>
</schema>

using the call

java dom.Counter -s -f test.xsd

and I get

[Error] test.xsd:7:65: cvc-elt.1: Cannot find the declaration of element
'schema'.
test.xsd: 651;30;0 ms (2 elems, 6 attrs, 0 spaces, 6 chars)

Shoudn't this work?

Thanks,
Allen

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




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