W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

Re: validating xml schemas with the standard schema

From: Eddie Robertsson <eddie@allette.com.au>
Date: Wed, 06 Jun 2001 10:54:39 +1000
Message-ID: <3B1D7F4E.5D1440A@allette.com.au>
To: Paul Jakubik <pauljakubik@yahoo.com>
CC: xmlschema-dev@w3.org
> > one thing that could cause your problem
> > is that you use xsi:schemaLocation in your schema.
> > xsi:schemaLocation is used in the
> > _instance_ document to give the schema processor a
> > hint on where to find the schema to be
> > used for validation.
> You are right. But in this case I am wanting to
> validate the schema against the schema-for-schemas. So
> my schema needs to be able to specify a location for
> the schema-for-schemas.
> Is this the right way to specify it? If so, then I can
> look into other issues.

Yes, it is the correct way to specify it but the xsi:schemalocation attribute is not
allowed on the xsd:schema element. In order to do this you have to add the following
DOCTYPE declaration at the top of your schema document:

<!DOCTYPE xsd:schema [
 <!ENTITY % schemaAttrs 'xsi:schemaLocation CDATA #IMPLIED
                           xmlns:xsi CDATA #IMPLIED'>

After you have done this you can add the xsi:schemaLocation attribute to your xsd:schema
element and it would look something like this:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"

Hope this helps.
Received on Tuesday, 5 June 2001 20:55:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:51 UTC