Subject:Re: Validation error in my schema when trying to modify the schema for schemas Author:Alberto Massari Date:15 Sep 2004 04:50 PM
At 13.48 15/09/2004 -0400, stylus-studio-tech Listmanager wrote:
>The attached schema is failing validation with 50 errors.
>Can you help out with this? I want to have the definitions and
>declarations that are defined and declared in the Schema for Schama
>available in my own schema, so I tried to import it:
>As you can see I am tring to import the schema for schemas to re-use the
>objects in my own application.
The problem is that Xerces doesn't support loading the XMLSchema.xsd
schema; that schema is not really "valid", especially in the part that
defines the built-in types like xs:string or xs:decimal (not by chance that
part of the schema has this comment "First the built-in primitive
datatypes. These definitions are for information only, the real built-in
definitions are magic.")
As Xerces only allows one schema document per namespace URI, and the
http://www.w3.org/2001/XMLSchema URI is always already loaded inside
Xerces, when you try to import XMLSchema.xsd you are not really loading
anything; so your schema cannot reuse the simple type xs:topLevelSimpleType
because it will not be placed in the grammar repository.
The only suggestion I can give you is to extract that definition (and the
ones it refers to) and place them into your schema.
Subject:Re: Validation error in my schema when trying to modify the schema for schemas Author:Alberto Massari Date:18 Sep 2004 01:09 PM
At 09.43 17/09/2004 -0400, stylus-studio-tech Listmanager wrote:
>From: "Jerry Sheehan"
>So is the schema for schemas is actually broken and not valid?
The schema for XMLSchema has been written only as a guide for the
developers of schema validators; its purpose is not to be a validator (also
because it doesn't capture all the rules of XMLSchema).
>Any parser that validates it is broken right?
That parser could be broken (i.e. not making some checks that are in the
specs) or very smart (i.e. not making those checks because it detects it's
a special schema); some vendors even decide to ship with a custom version
of that schema, one that they can parse.