Re: Wrapped around the axle: Refining and extending structures ac ross namespaces

Hi Mark,

> In the latter case, a file D (in ns1) includes the original file
> RefineExtend-NS1.xsd (the one that is being redefined in the example
> below). A file E in ns2 would like to use a construct in D, but with
> the redefined content. Short of altering D to include the
> redefinition instead of the original definition, the redefined types
> don't appear to be accessible to D. And, since ns1 is not under the
> control of the people developing ns2, there appears to be no easy
> way for D to bring in the redefinition file instead of the original
> definition.

It's a bit hard to follow what's going on from your description above.
To use the 'adapter' schema idea, the adapter schema has to be the
only one that is used by the ns2 schema - it must not import the
original ns1 schema. You either need to arrange it as follows:

          ns1 schema    ns2 schema
              |             |
          redefined     imported
              \             /
            adapted ns1 schema

And make sure that the ns2 schema does not import the ns1 schema. The
instance document must point to the adapted ns1 schema, may point to
the ns2 schema, but must not point to the original ns1 schema.

Or you need to arrange it like:

          ns1 schema
              |
          redefined
              |
       adapted ns1 schema
              |
           imported
              |
          ns2 schema

And make sure that the ns2 schema does not import the original ns1
schema. The instance document must point to the ns2 schema, and may
point to the adapted ns1 schema as well, but must not point to the
original ns1 schema.

Actually, this latter is probably a better arrangement (I'd suggested
the former arrangement in the earlier mail) - I don't like the way
that the ns2 schema doesn't actually include a reference to the ns1
schema even though it refers to its components.

If you can't get it working, perhaps you could post again with the
files that you're using and we can see where the trouble lies.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Thursday, 20 December 2001 11:07:59 UTC