[
Lists Home |
Date Index |
Thread Index
]
Dear Dare,
I agreed. It will work if I include lib2.xsd and lib3.xsd in lib1.xsd.
It would be very nice to be able to specify them at the instance document
level. If I have lib1.xsd to lib10.xsd, then I will have a huge collection
of number of libx.xsd files for different includes.
It would be great to have such schema parser can handle this.
Thanks so much for your quick response!
--Wo
----- Original Message -----
From: "Dare Obasanjo" <dareo@microsoft.com>
To: "Wo Chang" <wchang@nist.gov>; "XML" <xml-dev@lists.xml.org>
Sent: Wednesday, September 04, 2002 3:42 PM
Subject: RE: [xml-dev] using schemaLocation to point multiple same namespace schemas
I can't find any where in the W3C XML Schema recommendation where this
is disallowed but I can understand why a schema validator would want to
disallow that to reduce implementation complexity. Given that
xsi:schemaLocation is considered to be a hint, implementations are given
a lot of leeway in how they treat its contents if at all.
The Microsoft W3C XML Schema implementations pick the first schema they
see and associate that with the namespace then ignores the other
specified locations.
You can simply include lib2.xsd and lib3.xsd in lib1.xsd to get the
effect that you desire.
--
PITHY WORDS OF WISDOM
In any contest between power and patience, bet on patience.
This posting is provided "AS IS" with no warranties, and confers no
rights.
-----Original Message-----
From: Wo Chang [mailto:wchang@nist.gov]
Sent: Wednesday, September 04, 2002 12:23 PM
To: 'XML'
Dear All,
I'm sure this question been asked before, sorry!
Is it possible to use xsi:schemaLocation within an instance document to
import two or more same namespace schema(s)?
ex: xsi:schemaLocation="http://abc/lib lib1.xsd
http://abc/lib lib2.xsd
http://abc/lib lib3.xsd">
So that, there is no need to use any prefix when referencing any
libx.xsd elements/attributes. The idea is, lib.xsd (can be a set of
type libraries or elements) is getting too big, therefore, it got
separated by lib1.xsd, lib2.xsd, ...
By using "include" the above works since include will bring in the
additioanal schemas into the same namespace. However, by using
schemaLocation with multiple same namespace schemas seems like
complaining about re-defining the same namespace. I know it works by
using different namespaces.
I really want to use schemaLocation to reference multiple schemas for
the same namespace from instance document, this way I can pick and
choose which ever libx.xsd that I want to work with instead of hard
coding them using "include" from a top-level schema.
I'm very much appreciated for any hints and pointers!
Best regards,
--Wo Chang
|