Re: Schema for schemas bugs?

Hi Henry,

Thanks for your answer.

> > Since the schema at http://www.w3.org/2001/XMLSchema.xsd can't be used
> > directly for validation
>
> Why not?  It's a valid schema document (both XSV and SVC, the most
> rigourous schema checker I'm aware of) are happy with it.

Hmm, actually what I did was to remove the DOCTYPE declaration and the internal
subset but that shouldn't really change anything should it?
However, I see that XSV is happy with both of them but when I validate the schema
with SQC (IBM Schema Quality Checker) I'm not getting any errors when having the
DOCTYPE and internal subset present. However, if I remove these I'm getting the
following errors:

ERROR file = file:D:/Work/XMLSchema/Spec/XMLSchema.xsd line 418 column 19
TYPE REFINEMENT ERROR (content type incompatible with the content type of the
basetype):
In the definition of complexType
http://www.w3.org/2001/XMLSchema:complexRestrictionType, elementOnly content model
(...) is not a restriction of elementOnly content model (...), the content type
defined by the basetype.
------------------------------------------------------------------------
ERROR file = file:D:/Work/XMLSchema/Spec/XMLSchema.xsd line 464 column 19
TYPE REFINEMENT ERROR (content type incompatible with the content type of the
basetype):
In the definition of complexType
http://www.w3.org/2001/XMLSchema:simpleRestrictionType, elementOnly content model
(...) is not a restriction of elementOnly content model (...), the content type
defined by the basetype.
------------------------------------------------------------------------
ERROR file = file:D:/Work/XMLSchema/Spec/XMLSchema.xsd line 777 column 20
TYPE REFINEMENT ERROR (content type incompatible with the content type of the
basetype):
In the definition of complexType http://www.w3.org/2001/XMLSchema:all, elementOnly
content model (...) is not a restriction of elementOnly content model (...), the
content type defined by the basetype.

That's from SQC.

Also, I'm getting errors with regards to ALL the built-in type declarations:

1) Xerces:
(11 of 48) Schema problem: Facet 'whiteSpace' is not allowed by this type. AND
(12 of 48) Schema problem: Unknown base type 'xs:anySimpleType' for a type 'string'

2) MSXML:
XMLSchema.xsd#/schema[1]/simpleType[@name='hexBinary']/restriction[1]: WhiteSpace
constraining facet is prohibited.

> > complexRestrictionType AND simpleRestrictionType
> > -----------------------------------------------------
>
> <snip/>
>
> > Most schema validators give me an error saying that the last derivation
> > by restriction is not valid. However, it feels to me that this
> > derivation step should be valid
>
> I think so too -- what error messages are you getting?

1) See above for SQC without DTD
2) Xerces 2.0.1 gives me:
(1 of 48) Schema problem: Error for type 'complexRestrictionType'.  The particle of
the type is not a valid restriction of the particle of the base. There is not a
complete functional mapping between the particles.
3) MSXML:
Invalid particle derivation by restriction.
Base type: restrictionType
Derived type: complexRestrictionType

and the same for simpleRestrictionType.

> > groupRef AND attributeGroupRef
> > -----------------------------------
> > The situation is similar to the previous, some validators give an error
> > in the last derivation step saying that groupRef is not a valid
> > restriction of realGroup.  Again I think that this restriction is fine.
>
> I agree.

1) No error in SQC without DTD
2) Xerces:
(5 of 48) Schema problem: Error for type 'groupRef'.  The particle of the type is
not a valid restriction of the particle of the base.
(6 of 48) Group's occurrence range is not a valid restriction of base group's
occurrence range.
3) No error in MSXML

> > all
> > ---
> > In this case I agree with the validators since in the "all" complexType
> > restriction the group xs:allModel is referenced without being declared
> > in the the base type.
>
> But that's irrelevant to the validity of the restriction, which is
> based on the components, and at the component level the group
> reference is resolved to its referent.

Ahh, of course you're correct. This is a big derivation chain but still it looks
correct to me now after resolving all the references. Still I get the following
errors:

1) SQC without DTD:
ERROR file = file:D:/Work/XMLSchema/Spec/XMLSchema.xsd line 777 column 20
TYPE REFINEMENT ERROR (content type incompatible with the content type of the
basetype):
In the definition of complexType http://www.w3.org/2001/XMLSchema:all, elementOnly
content model (...) is not a restriction of elementOnly content model (...), the
content type defined by the basetype.

2) Xerces:
(7 of 48) Schema problem: Error for type 'all'.  The particle of the type is not a
valid restriction of the particle of the base.
(8 of 48) Schema problem: There is not a complete functional mapping between the
particles.

3) No errors in MSXML

So, I guess we agree that the schema should be valid and that some of the
validators are in error. What is your thought about removing the DOCTYPE and
internal subset? It seems strange that SQC validates fine with the DTD but gives
errors when you remove it.

Thanks for your help
/Eddie

>

Received on Monday, 15 April 2002 20:40:45 UTC