[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Including multiple schemas - duplicate name errors
- From: "David E. Cleary" <davec@progress.com>
- To: Cheryl_Gielau@cargill.com, xml-dev@lists.xml.org
- Date: Tue, 21 Aug 2001 15:52:34 -0400
> Sure it's overkill, but if you plan
> to extend the message set, it's
> possible to run into this situation
> again and again.
Well, I'm a firm believer that namespaces are immutable once published. Any
extensions to the message set would rev a namespace too. Also, I would treat
common types a little differently. I would create a schema that has no
targetNamespace and only include type definitions in it. Then, when the get
included into other schemas, they get brought into the namespace of the
including schema. Because only type definitions are in this schema, there is
no problem extending it with new message types.
Your problem is a little different because you not only have common types,
but you also have common elements. One solution is to use local element
declarations. Unless these common elements have a requirement that they are
root, there is no need to make them global. Types are stored in a single
file, so while there is some introduction of human error by having to
declare common elements multiple times in different contexts, it is
managable.
It may be that the best solution for your case is a schema file for each
common element. However, it isn't a problem I've given alot of thought to,
so I do not have anything I would consider a "best practice".
Hint to Roger. You may want to capyure this thread.<G>
Dave