Hi, If I validate this:
<test:Root xmlns:test="http://www.example.com"> <test:Wrong/> </test:Root> against this schema: <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com"> <element name="Root"> <complexType> <sequence> <any namespace="##any" processContents="lax"/> </sequence> </complexType> </element> </schema> Xerces doesn't *report* any problems. This is, of course, legitimate, because xerces is falling back on validation against the urType as allowed by the schema spec for lax validation. Examination of the PSVI reveals that "Root" has only been partially validated, and that "Wrong" has validity "notKnown". In the real world outside of schema spec logical formality, however, there's clearly a problem here: we've got the schema for the "Wrong"'s namespace, and we know that there is no "Wrong" element (at least as the contents of that namespace are defined for the purposes of the current validation episode). As a client of Xerces, the only way I can see to report this is an error to the user is to examine all of the PSVI after parsing until I find the node that caused the problem; recreating a useful error message then becomes a real headache as well :( Is there any chance that Xerces could report a warning when it can't find an element declaration but does have a grammar for the relevant namespace? I am at a loss to think of any real world use case where this behaviour would actually be harmful, and in many cases I think it would be quite useful... Lucian -- Lucian Holland, Technical Architect +44-1865-203192 DecisionSoft Limited http://www.decisionsoft.com XML Development and Services --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
