Thank you for your help.
I removed the document type declaration and referenced the schema in the
root node as you suggested. I now receive a new error:
Element type "Method" must be declared.
"Method" is my root element.
I'm sure I am making some kind of rookie mistake. Instead of asking everyone
to help me debug my project, perhaps someone can suggest some reference
material on schema validation using SAX and Xerces 1.x?
-----Original Message-----
From: Andreas Th�nnessen [mailto:[EMAIL PROTECTED]
Sent: Friday, September 07, 2001 1:32 AM
To: [EMAIL PROTECTED]
Subject: Re: newbie question: schema validation in Xerces-J 1.4.1
David Lindquist schrieb:
:
> I am using SAX 2.0 and Xerces-J 1.4.1. I have verified that the schema is
> well-formed. The parsing worked fine when I referenced a DTD. Why can I
not
> simply change the document type declaration to reference the schema file?
Or
> does Xerces-J 1.4.1 not support schemas in this way?
:
In difference to the DTD reference
<!DOCTYPE rootnode SYSTEM "my.dtd">
the reference to a schema must be made with
<rootnode
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='my.xsd'>
:
</rootnode>
It's not possible to only change the "my.dtd" to "my.xsd"!
Hope this helps,
Andi.
--
---------------------------------------------------- _____
Andreas Th�nnessen mailto:[EMAIL PROTECTED] /|
Philosys Software GmbH http://www.philosys.de/ /_|
---------------------------------------------------- / |
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]