On Wed, 21 Mar 2001, Wayne Bradney wrote: > Ian, > > Well put. It's interesting that your system validates against the latest > version of the schema, but for us that would defeat one the biggest > advantages of using XML in the first place: the loose coupling of client and > server applications. If we allow the client to specify which version of the > schema it's message conforms to, it allows our server to support multiple > versions of the protocol, which in turn allows us to avoid "lock-step" > upgrades of client and server code. As long as later versions of the > protocol are backwardly compatible (ie. additive or type changes only), > enhancing the services provided by the server does not _require_ immediate > changes in the clients -- they can upgrade at their leisure. I suppose in > this respect our system is document-centric.
In our system the reason we have multiple schema versions out there is that the standard is still under development. However we now have the final versions fixed, and only these versions will be acceptable when the system goes live. Therefore we need to make sure documents submitted to the service are validated against these fixed schemas. > If you don't mind my asking, what mechanism _do_ you use to determine which > schema to pick for validation, and then subsequently validate the document? We have patched Xerces so that we can provide a Hashtable mapping namespace URIs to schemaLocations which overrides any xsi:schemaLocation specifications. We then use an EntityResolver to redirect these fixed locations to our own copies of the schemas. Thus, if the parser encounters an element in one of our known namespaces, it will be validated against the correct schema. This has the added advantage that we don't have to require that xsi:schemaLocation hints be specified on our documents at all. Ian -- Ian Roberts, Software Engineer DecisionSoft Ltd. tel: +44-1865-203192 http://www.decisionsoft.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
