Assuming you're using a relatively new version of the parser, you should be able to use the JAXP 1.2 XML Schema properties, see [1] for examples. You'll need to make sure you set the parser to "validating".
If you're using the Xerces features, I believe you need to explicitly enable XML Schema validation [2], in addition to just the validation feature [3]. -Nathan [1] http://java.sun.com/xml/jaxp/change-requests-12.html [2] http://xml.apache.org/xerces2-j/features.html#validation.schema [3] http://xml.apache.org/xerces2-j/features.html#validation -----Original Message----- From: Michael Woinoski [mailto:[EMAIL PROTECTED] Sent: Sunday, December 05, 2004 8:04 AM To: [EMAIL PROTECTED] Subject: validating documents (SOAP messages) with no schemaLocation attribute For security purposes, I need to validate documents (incoming SOAP messages) using a schema. The messages do not contain a schemaLocation attribute. The elements in the message are defined with namespaces, so the noNamespaceSchemaLocation attribute isn't appropriate. And adding schemaLocation using DOM requires parsing the message without validation, which is what I'm trying to avoid. Is there any way to use a schema to validate a document without adding a schemaLocation attribute to the document? The externalSchemaLocation property seems to work only if the document already contains a schemaLocation attribute. Thanks, Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]