> On Thursday, July 03, 2003 5:23 PM, Neil Graham > <[EMAIL PROTECTED]> writes: > > > > How does this approach handle things like the schema unique particle > > attribution or element declarations consistent constraints? > > Clearly you > > could parse schema documents simply using information from the > > schema-for-schemas, but using that alone, surely it's not > possible to > > handle all conditions imposed on valid schemas by that spec. > > Ah, Neil, you're a man in the trenches with Schema along with me! >
My apologies Neil, Just after hitting "send" I realized I think I answered a different question than the one that was asked. Let me try again. We have three layers the compiler handles. Basically the compiler's job is to go from (1) -> (2) -> (3). (1) Schema syntax (2) Schema type system in-memory (3) Schema metadata binary persistence format Layer (1) is handled by schema-for-schema as described in the previous mail. Layer (2) is where we do type resolution and verify all the semantic rules of schema that are not imposed by s4s for example particle valid (restriction) and element consistency and actually many many many other rules. I think layer (2) is the answer to your question. Layer (2) catches the valid-schema errors that are not syntactic-validation issues. Building layer (2) is the core of the compiler. Once we pass layer (2) then we have a fully valid schema type system and can persist it as layer (3). Layer (3) can be loaded directly at runtime for high-speed schema validation. [basically it reconstructs (2) on-demand.] Or at runtime if you choose to build the schema types via layer (1) and (2) you can do that too. David Bau XMLBeans Architect --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]