Hi Kiran, For question 1, I'm not sure I follow what you need. Are you after some kind of feature that will validate an element if it can find a declaration for that element, but ignore it if it can't? i.e., if your schema has global element a, b, and c, no local element decls, and your document instance contains <d/>, you want that not to be considered? If that's in any way right, then no, there's certainly no way to do this. You're best bet is to specify <xs:any processContents="skip"/> wherever you could possibly have undeclared elements.
As to your second question, the standard approach is to use the http://apache.org/xml/properties/external-schema-location property to bind a list of location hints to the list of namespaces you'll be using, then register an entity resolver on the parser and return input sources that contain empty streams. That way you're guaranteed the parser won't try and resolve anythig on its own. Hope that helps, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] |---------+----------------------------> | | "Bagepalli, | | | Kiran" | | | <[EMAIL PROTECTED]| | | matica.com> | | | | | | 04/01/2003 04:39 | | | PM | | | Please respond to| | | xerces-c-dev | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> | | cc: | | Subject: LAX Validation | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| 1. Is there any way I could run the parser with Lax validation. I just want to ignore elements which are not a part of the schema. I know schemas allows the 'any' content with lax validation. I am looking for something more general than that. 2. Is there a way I could force the parser to ONLY use the preloaded grammar. This is like saying ignore all grammar(DTD/Schema) specified in the document and use the grammar that was explicitly loaded. Thanks --------------------------------------------------------------------- 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]