Tips are provided
below to facilitate the usage of OSRs:
- An OSR is not a schema library. In other words, you should not
throw all necessary schemas into a single OSR and use it similar to
a library.
- Schemas should reference one another by way of the <xs:import
…> construct. That is, OSRs are meant to contain hierarchies
of schemas, where one or more schemas reference others to handle increasingly
more specific structures in the source XML document being transformed.
- You should consider creating one schema OSR to validate entire
classes of documents.
The OSR used for validation becomes part of the parse instance,
and remains in use for all validating parse requests until a different
one is specified through the control service. Callers who use buffer
spanning to pass documents to and from the parser in pieces should
know that schemas cannot be changed in the middle of the parse process.
A control request to specify a different schema will cause a reset
of the parse instance so that the next parse request must be for a
new XML document.