Hi Maik. It's "xsi:schemaLocation" (lowercase 's'). The first letter of
every predefined element/attribute name in xml/schema is in lowercase.

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



                                                                                
                                   
                    Maik Weber                                                  
                                   
                    <[EMAIL PROTECTED]       To:     "[EMAIL PROTECTED]" 
<[EMAIL PROTECTED]>     
                    .de>                 cc:                                    
                                   
                                         Subject:     Re: Problem with 
XMLSchema/Namespaces                        
                    07/13/2001                                                  
                                   
                    04:50 AM                                                    
                                   
                    Please respond                                              
                                   
                    to                                                          
                                   
                    xerces-j-user                                               
                                   
                                                                                
                                   
                                                                                
                                   



Hello,

me again. I use Xerces 1.4.1 and JDK1.3 on my computer.

cheers
maik

-------- Original Message --------
Subject: Problem with XMLSchema/Namespaces
Date: Fri, 13 Jul 2001 10:47:12 +0200
From: Maik Weber <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

Hello,

i have written a very little XML-document using a Schema and Namespaces.

test.xml:
<?xml version="1.0"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xmlns="http://www.test.com";
     xsi:SchemaLocation="http://www.test.com
                                        test.xsd">
    <a>Beispiel:</a>
</root>

Here is the corresponding test.xsd:
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
                    targetNamespace="http://www.test.com";
                    xmlns="http://www.test.com";
                    elementFormDefault="qualified">

  <xs:element name="root">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="a" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="a" type="xs:string" />

</xs:schema>

When i use SaXCount to validate test.xml, i get following error:

$ java sax.SAXCount -v test.xml
[Error] test.xml:7:36: General Schema Error: Grammar with uri 2:
http://www.test.com , can not be found.
[Error] test.xml:7:36: Element type "root" must be declared.
[Error] test.xml:8:6: Element type "a" must be declared.
...

What did i wrong?

maik
--
* Homepage: www.webis-world.de
* mailto        : [EMAIL PROTECTED]
* ICQ           : #57313947

---------------------------------------------------------------------
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