- From: Dan Vint <dvint@dvint.com>
- Date: Fri, 03 Dec 2004 08:39:18 -0800
- To: xmlschema-dev@w3.org
Ok, so maybe this is allowed by schema mechanisms and might even work with
particular tools sort of. Too me, listing multiple locations for a schema
is sort of the catalog approach to find a single schema, not allow a
substitution of a variety of schemas. This seems very ugly from say an XSLT
standpoint, now instead of having a stylesheet that works with one subset
of the elements, I have to have a schema that basically recognizes them all
- makes management of the stylesheet more difficult.
Is the idea of having multiple schemas under one namespace what was
intended and do others think this is a good use or an abuse of the
namespace mechanism?
What about using one file out of a schema comprised of a number of files?
..dan
At 08:00 AM 12/3/2004, Jeff Rafter wrote:
>>In the Namespace spec I can't see any guidance on this question and with
>>the schema spec saying schema location information is optional and at
>>best a hint I don't see any help there either. With the schema location
>>info being a "hint" there seems to be no way to make clear that I would
>>want namespace foo with schema 1 rather than schema 2. So I lean towards
>>this not being necessarily illegal, but a REALLLLLY poor design.
>
>As Xan said, your assumption about <include> was incorrect-- you can
>include items in the same namespace. This leaves you three options as near
>as I can tell:
>
>(1) Create a "driver" or "master" schema-- this does nothing more than
><include> your two divergent but like-namespaced schemas. Now you are back
>to one schema, which you prefer.
>
>(2) Include more than one schema in the schemaLocation hint
>
> xsi:schemaLocation="http://foo schema1.xsd
> http://foo schema2.xsd"
>
>Unfortunately support for this is spotty.
>
>(3) Use some other out of band mechanism. For example in Xerces or MSXML
>you can list multiple schemas to be used for validation. Additionally
>there is RDDL which allows you to identify which schemas can be used to
>validate items coming from a particular namespace (XSV supports this but
>again support for this is not very common) or use NRL (namespace routing
>language) which should allow you to do exactly what you want. Of course I
>haven't seen support for NRL in any XML Schema processor...
>
>So of these... option (1) is the most stable.
>
>Cheers,
>Jeff Rafter
---------------------------------------------------------------------------
Danny Vint
Specializing in Panoramic Images of California and the West
http://www.dvint.com
voice: 510-522-4703
fax: 801-749-3229
Received on Friday, 3 December 2004 16:37:33 UTC