[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: cvc-elt.1: Cannot find the declaration of element 'xs:schema'

From: Bob Schloss <rschloss@us.ibm.com>
Date: Tue, 12 Feb 2002 09:44:50 -0500
To: "Hua Yang" <gt5300a@prism.gatech.edu>
Cc: xmlschema-dev@w3.org
Message-ID: <OFEE1ABE3E.44CAB451-ON85256B5E.0050A35A@pok.ibm.com>
cvc elt.1

Questions about Xerces-J, including its schema validator,
should be posted to the mailing list xerces-j-user@xml.apache.org .

To subscribe to that mailing list,
 send an e-mail to    xerces-j-user-subscribe@xml.apache.org
with subject             Subscribe firstname lastname

"Hua Yang" <gt5300a@prism.gatech.edu>@w3.org on 02/11/2002 10:26:26 AM

Sent by:    xmlschema-dev-request@w3.org

To:    <xmlschema-dev@w3.org>
Subject:    cvc-elt.1: Cannot find the declaration of element 'xs:schema'


I tried to use Xerces2 to validate the personal.xsd schema which come with
the Xcerces2 distribution. But got the error cvc-elt.1: Cannot find the
declaration of element 'xs:schema'.

On the old version Xerces faq site
http://xml.apache.org/xerces-j/faq-general.html it says
"We hope to introduce functionality to permit schemas to be validated
independently of instance documents in Xerces2".

So does the Xerces2 really can validate schemas independently? If yes, how?


The personal.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>

 <xs:element name="personnel">
     <xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/>

  <xs:unique name="unique1">
   <xs:selector xpath="person"/>
   <xs:field xpath="name/given"/>
   <xs:field xpath="name/family"/>
  <xs:key name='empid'>
   <xs:selector xpath="person"/>
   <xs:field xpath="@id"/>
  <xs:keyref name="keyref1" refer='empid'>
   <xs:selector xpath="person"/>
   <xs:field xpath="link/@manager"/>


 <xs:element name="person">
     <xs:element ref="name"/>
     <xs:element ref="email" minOccurs='0' maxOccurs='unbounded'/>
     <xs:element ref="url"   minOccurs='0' maxOccurs='unbounded'/>
     <xs:element ref="link"  minOccurs='0' maxOccurs='1'/>
   <xs:attribute name="id"  type="xs:ID" use='required'/>
   <xs:attribute name="note" type="xs:string"/>
   <xs:attribute name="contr" default="false">
     <xs:restriction base = "xs:string">
       <xs:enumeration value="true"/>
       <xs:enumeration value="false"/>
   <xs:attribute name="salary" type="xs:integer"/>

 <xs:element name="name">
    <xs:element ref="family"/>
    <xs:element ref="given"/>

 <xs:element name="family" type='xs:string'/>

 <xs:element name="given" type='xs:string'/>

 <xs:element name="email" type='xs:string'/>

 <xs:element name="url">
   <xs:attribute name="href" type="xs:string" default="http://"/>

 <xs:element name="link">
   <xs:attribute name="manager" type="xs:IDREF"/>
   <xs:attribute name="subordinates" type="xs:IDREFS"/>

 <xs:notation name='gif' public='-//APP/Photoshop/4.0'

Received on Tuesday, 12 February 2002 09:46:14 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
First Name
Last Name

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.