Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Is schemaLocation just a hint in schema import? >Thread Next - Re: Is schemaLocation just a hint in schema import? Re: Is schemaLocation just a hint in schema import?To: "Antoli, Leo" <Leo.Antoli@-----.---> Date: 10/9/2006 8:14:00 AM > Does it mean that you can't have 2 schemas defining different > elements for > the same namespace and then import both from another schema? Not reliably, anyway. For a given schema usage, there is one schema for a given namespace URI. A "schema document" is different from a "schema". From the XML Schema perspective, a schema is roughly a set of schema components all having the same namespace URI. > Should everything for a given schema be defined in just one schema > file? If > you have a big schema definition for different functional areas, it > might be > useful to split the schema in several files so you don't need to > import > elements that you won't be using. There may be multiple schema documents used to create a schema; however, you can only reliably import a schema using a single location. Instead, you should build a grouping schema document that <xs:include>s the other schema documents that are in the same namespace and then import the schema using the location of the grouping schema document. > Can anybody tell me the motivation for this note in the schema spec? To allow maximum flexibility in schema processors. For instance, to allow a processor to keep known schemas in a cache, while ignoring the location hint altogether. However, this flexibility can lead to other problems, for instance, in the presence of multiple versions of the same schema. xan From zafar.abbas@m... Mon Oct 09 19:24:14 2006 Receive | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
