During the last couple of days several Xerces users pointed out that the XML Schema REC states that the schemaLocation/noNamespaceSchemaLocation attributes provide only a hint on how to locate XML Schemas. Xerces on the other hand was relying on those attributes to do schema validation properly. Today we've added 2 properties on Xerces-J parser that change this behavior and allow the user to specify XML Schemas that he/she wants to use for validation of a document. The properties are: ****************** http://apache.org/xml/properties/external-schemaLocation http://apache.org/xml/properties/external-noNamespaceSchemaLocation The sample usage: ****************** parser.setProperty( "http://apache.org/xml/properties/external-schemaLocation", "http://www.example.com example.xsd http://www.schema.com/ test.xsd"); parser.setProperty( "http://apache.org/xml/properties/external-noNamespaceSchemaLocation", "personal.xsd"); Short description: ****************** Property: http://apache.org/xml/properties/external-schemaLocation Allows to specify a _list_ of XML Schemas (with targetNamespace) to be used by parser. The syntax is the same as syntax for schemaLocation attribute. http://apache.org/xml/properties/external-noNamespaceSchemaLocation Allows to specify one XML Schema that does not have any namespace. Note! The parser does not ignore schemaLocation/ noNamespaceSchemaLocation attributes. If schema with the same targetNamespace appears in both the list user specified and on schemaLocation, the one from user's list will be pick up for validation. Give it a try! Thank you, Elena. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
