W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2003

Re: infinite loop

From: Jeff Rafter <jeffrafter@defined.net>
Date: Fri, 10 Jan 2003 08:20:54 -0600
Message-ID: <02e601c2b8b3$7d1c5220$54f0d90c@c1980223a>
To: "Jeni Tennison" <jeni@jenitennison.com>
Cc: <xmlschema-dev@w3.org>

Hi Jeni,

> The Particle Emptiable constraint mainly comes into play when checking
> whether a particular derivation by restriction is OK and, as you point
> out, when checking whether it's legal to specify the default value for
> an element (it's only legal if the type of the element is simple or if
> it's mixed and emptiable).

Actually, I was a little confused on the mixed default value, I had misread
it initially and it does apply only to the default value as you point out. I
was thinking it applied to the whole of the mixed complexType declaration.

> None of this (as far as I can tell) makes any difference to whether a
> recursive standalone type definition is legal or not, so I don't think
> that Particle Emptiable comes into play here. I may have missed
> something though.

I could be horribly confused (<confession type="admitting to being away from
XML Schemas for a while"/>) but I thought by the following logic it was

Section 3.9 (http://www.w3.org/TR/xmlschema-1/#cParticles) specifies the
details for Particles. Element declarations are Particles and do "contribute
to the definition of content models". With that established (though I don't
think it was in dispute : )) I jump down to 3.9.6 Constraints on Particle
Schema Components (http://www.w3.org/TR/xmlschema-1/#coss-particle) where it

    "All particles (see Particles (3.9)) must satisfy the following

Then we get a list of Particle constraints that include Particle Correct,
rules for extension and restriction (which reference other rules), Ocurrence
Range OK, more derivation rules, and finally Particle Emptiable. I think
that the rule is intended to apply to all particles not just derivations
(though it is additionally referenced there). It functions similarly to the
Occurence Range OK rule-- which is also sandwiched in a strange spot-- but
is implemented by several XML Schema editors/validators. I think the rec is
saying "All particles...(among other things)... must be emptiable".

Of course, because the rule is last and after all of the derivation rules,
the rec could be interpretted to imply that it is only useful in those
cases. In any event, it is a minor rule-- even if it is broken, an instance
document could never be created to satisfy the schema (as you pointed out)
so the schema author would discover the problem, eventually. The reason I
bring it up really is my own curiousity, really, as I am not positive either

I tried the latest IBM SQC and it did not catch the error, but it did catch
an Occurence Range OK error.


Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting
Received on Friday, 10 January 2003 09:14:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:59 UTC