Sebastien,
Thanks
for your response. it helps to eliminate those elements not defined errors. but
there still is an error:
[Error] :4:59: Attribute "xsi:noNamespaceSchemaLocation" must be declared
for element type "personnel".
Both
your code and mine work with the DTD-only xml file, but both report the same
error if I added the
schema
to the xml file.
any
idea to validate an xml file against a schema?
James
-----Original Message-----
From: Sebastien Marechal [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 10:34 AM
To: '[EMAIL PROTECTED]'
Subject: RE: validating with schemaJames,Check if you have you dtd included within the xml file as shown below:<!DOCTYPE JobPositionSeeker SYSTEM "JobPositionSeeker-v1.0.dtd">Then check your dtd is in the right path.If this doesn't work u can have a look at the two classes which only validate the xml document against the dtd. This is the one I use and it works fine.Hope this helpsregardsSeb***********************************************************************
S�bastien Mar�chal
Analyst Programmer
Job Partners Ltd.
Mobile: 0044 (0) 775 994 1124
[EMAIL PROTECTED]
***********************************************************************-----Original Message-----
From: James Liu [mailto:[EMAIL PROTECTED]
Sent: 17 May 2001 15:01
To: [EMAIL PROTECTED]
Subject: validating with schemaHi,
I'm trying to validate the example xml file personal-schema.xml, but it seems the SAXparser doesn't know the schema,
when I set the validation to true, it always reports the elements in the xml are not defined. Do I have to set somethingspecial for the schema? anybody knows why?
BTW, the parser works with the DTD.
thanks in advance.
James
