you
could also use
org.xml.sax.EntityResolver
see the javadocs for
details
-----Original Message-----
From: Rahul Srivastava [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:31 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Validating against an explicitly provided schema with SAX
From: Rahul Srivastava [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:31 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Validating against an explicitly provided schema with SAX
Hi
Andy,
If you want to
override the schema referred from the instance document, you can use the
http://apache.org/xml/properties/schema/external-schemaLocation property.
See: http://xml.apache.org/xerces2-j/properties.html#schema.external-schemaLocation for more details.
Cheers,
Rahul.
-----Original Message-----
From: Andy Taylor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 6:12 PM
To: [EMAIL PROTECTED]
Subject: Validating against an explicitly provided schema with SAXHi,I'm writing an application which allows users to upload XML files to an online J2EE application, which then inserts their data into a database for processing. I am providing users with an XML schema file online, which will allow them to validate any files they create before they upload them.Once a file has been uploaded, I want my server-side application to re-validate their XML files before attempting to process their data. To do this, I need to ignore the schema they have (maybe) specified with the root element, and re-specify the schema which is to be used. This should stop users from simply uploading any old valid XML file, for example a completely unrelated XML file which is valid as no schema has been specified.O'Reilly's XML In A Nutshell tells me I should be able to do this with SAX, but I can't seem to find any info on how. Can anyone help me out?Andy
Protect your PC from e-mail viruses. Get MSN 8 today. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]