W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2005

Schema Help - importing schema

From: Kevin L. Cobb <kevin.cobb@emergint.com>
Date: Mon, 29 Aug 2005 11:30:52 -0400
Message-ID: <6C1FF371E2319F45BABA49F9BA1BD0391B2AAB@mail.lou.emergint.com>
To: <xmlschema-dev@w3.org>
I am new to the list and pretty new to schema definitions, although I
work with XML and XSLT a lot.


I am trying to define multiple schema's that reference each other and am
running into some problems. When I try and validate my Source XML with
the Source Schema (books.xsd), I get the error: "Cannot find the
declaration of element 'book'." Based on what I know, the schema
definitions and the import is correct but, obviously, there is a
problem. Can someone provide some direction. 

Source XML:

	<book xmlns="http://books/ <http://books/> "
xmlns:money="http://money/ <http://money/> ">
	   <author>Charles Dickens</author>
	   <title>Oliver Twist</title>

Source XSD (books.xsd):


	   <xs:import namespace="http://money/"

	   <xs:element name="book">
	            <xs:element name="author" type="xs:string"/>
	            <xs:element name="title" type="xs:string"/>
	            <xs:element ref="money:gbp"/>
	            <xs:element ref="money:dollar"/>


Imported Schema Number 2 (money.xsd):

	   <xs:element name="gbp" type="xs:integer" />
	   <xs:element name="dollar" type="xs:integer" />



Kevin L Cobb, MT(ASCP), SCJP2
Senior Software Engineer
Emergint, Inc.
2724 River Green Circle
Louisville, KY 40206
Kevin.Cobb@emergint.com <mailto:Kevin.Cobb@emergint.com> 
502.896.6210 ext 255
502.896.6170 fax


The preceding e-mail message and attachments, if any, contains
information that is confidential and qualifies as such under the
Definition of Confidential Information in the Non-Disclosure Agreement,
and may constitute non-public information and trade secrets. It is
intended to be conveyed only to the designated recipient(s). If you are
not an intended recipient of this message, please notify the sender at

Received on Tuesday, 30 August 2005 02:31:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:30 UTC