Lists Home |
Date Index |
> The special thing is that the potential number of namespaces/schemas
> appearing in instances (beyond the core schema) is undetermined, and I
> therefore do not want to include a reference to the "extended" schema(s)
> inside the "core" schema. Instead, I would like to have a definition in
> the core schema that says something like:
> "after the echo element, let there follow any number of elements from
> any namespace whose type extends the type XY" (where XY would also be
> defined in the core schema).
> The only meachnism that I found in XML schema that comes close is the
> xsd:any element, but that does not alow me to specify the derivation
> constraint I mentioned above.
This is not exactly what you asked for, but on one job I had a requirement
to allow certain types to be extended with local vendor-specific
extensions - these were mostly enumerated values, but some were more
complicated. My response was to add an extension element to the element in
question whose type was imported (with its own "local" namespace) from
another schema. A vendor could modify the imported schema and corresponding
instance documents could be validated against the core and imported schemas.
It would be possible to make the imported type to be any complex type, and
so you could accomodate the kinds of things you talked about, I think.