I think this is a really nice usage of XSchema and no different from most other
XSchema applications -- the deciding factor is that the application gathers
schema information at run time, rather than having it hard-coded. In general,
the code that does this shouldn't care if the schema information changes
half-way through the file.
So by all means, continue to play. It will give us more concrete data about
implementing XSchema and perhaps open some new ground for 2.0. I would also
point out that, not only is this idea useful for validation, it is also useful
for building database storage structures on the fly.
As I mentioned before, we are unlikely to address this in 1.0, but I would
suggest the following (non-guaranteed) semantics for forward compatibility:
1) The XSchema applies to everything following it until the next XSchema is hit.
2) Each XSchema completely replaces the previous XSchema.
-- Ron Bourret