This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5078 - define required components
Summary: define required components
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: Macintosh All
: P1 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL: http://www.w3.org/TR/2007/WD-xmlschem...
Whiteboard: composition cluster
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2007-09-26 01:21 UTC by Xan Gregg
Modified: 2008-05-31 15:18 UTC (History)
0 users

See Also:


Attachments

Description Xan Gregg 2007-09-26 01:21:28 UTC
From 4.1 Layer :

    no element information item can be fully assessed 
    unless all the components required by any aspect of
    its (potentially recursive) ·assessment· are present in the schema.

It's unclear to me what makes a component required with respect to concepts like lax wildcards and not-in-schema wildcards. In particular, how hard does a processor need to work to find such potential declarations? Section 4.2.2 says that building schemas from schema documents is all or nothing, but there seems to be no such binding on the completeness of imported schemas.
Comment 1 C. M. Sperberg-McQueen 2007-12-27 00:36:05 UTC
Thank you; good point.

At a first approximation, I think the current text's best effort at
clarifying this issue lies in the rules (e.g. in Validation Rule: Element 
Locally Valid (Element)) which say things like "The declaration must not
be absent", and I think the upshot is that validation can take place even
if element declarations referred to in a content model are not present
in the schema -- as long as they are not in fact needed to validate the
document instance.  And similarly, I think, for type definitions:  if they
are not needed, they need not be present.  

Element declarations not explicitly referred to, which might govern 
elements which match a wildcard, are (I think) definitely not required for
validation, and the text should probably be revised to make that clearer.

Further clarification may be hoped for from the WG's discussions of 
schema composition; some current proposals on that topic include clarifications
of the idea of schema completeness, and when the WG discussion reaches a
conclusion, I hope it will be possible to draft wording that addresses the
problem identified in this issue.
Comment 2 David Ezell 2008-01-24 21:32:10 UTC
Editors to make an attempt.
Comment 3 C. M. Sperberg-McQueen 2008-05-20 16:00:59 UTC
A working paper on the questions raised by this issue is at

  http://www.w3.org/XML/Group/2008/05/xsd-bug5078.html
  (member-only link)

Section 4.1 does not mention wildcards, so there is no obvious hook
for inserting a statement that processors need not engage in heroic efforts
to find element declarations for elements otherwise unknown which match
lax or not-in-schema wildcards.  Instead, the working papper proposes a 
generic note reminding the reader that if required components are missing,
the result is that some items in the PSVI will have [validation attempted]
= 'partial' or 'none'.  We can hope that this will act as a sufficient
reminder that the spec does have rules for dealing with missing components.

On the broader question of making those rules a little clearer, it's not 
clear to me, on the basis of the working paper, whether we want to invest
in changing this part of the spec now or not.  To the extent that we 
content ourselves with clarifying what the spec already says, of course, 
editorial changes can be made at any time; if we want to change the rules,
however -- e.g. by providing that missing type references are replaced by
references to xs:error -- then we need to make that change before we go to
Last Call.
Comment 4 Xan Gregg 2008-05-20 17:45:12 UTC
The entire paragraph I excerpted from is (from 1.1):

    ·Assessment· is defined with reference to an ·XSDL schema·
    (note not a ·schema document·) which consists of (at a minimum)
    the set of schema components (definitions and declarations)
    required for that ·assessment·. This is not a circular definition,
    but rather a post facto observation: no element information item
    can be fully assessed unless all the components required by any
    aspect of its (potentially recursive) ·assessment· are present
    in the schema.

I would prefer just:

    ·Assessment· is defined with reference to an ·XSDL schema·
    (note not a ·schema document·).

Then you can elaborate or point elsewhere to explanations that assessment can be full, partial, or none (or is "error" now an option, too?).

In the quoted 1.1 text, the first sentence is about assessment proper, and the second sentence attempts to explain the first sentence but appeals informally to a different concept: full assessment.

Regarding the "Notes on undischarged references", my only concern for this bug was about things like lax wildcards rather than undischarged references, but I welcome clarifications in that area. Without the clarification I would treat undischarged references as errors preventing any PSVI generation.

I'm not able to analyze the details of the paper, but I will note that I find the phrase "required within the meaning of section 4.1" confusing because of the aforementioned duality. I don't know if you mean required for assessment or required for full assessment.
Comment 5 C. M. Sperberg-McQueen 2008-05-29 06:46:32 UTC
A wording proposal containing two different proposals for addressing
this issue (or possibly three, or four, depending on how you count) is at 
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b5078.html
(member-only link).

Comment 6 Michael Kay 2008-05-29 15:45:48 UTC
Typo: evaludation
Comment 7 C. M. Sperberg-McQueen 2008-05-31 03:02:20 UTC
The working group adopted the wording proposal made by Xan Gregg in 
comment #4 at its call today.  The other material in the proposal
mentioned in comment #5 was not adopted, since the WG had no consensus on
which of the two variant proposals embodied in it (Proposal A, aka
"you valid with the schema you've got", or proposal B, aka "Close only
counts in horseshoes:  if there's an undischarged reference, or a 
reference to an unusable component, then the component is unusable.")
is actually closer to (a) the rules enunciated in the status quo, or (b)
what existing implementations actually do.

Since the wording proposal does address the issue actually raised by
the originator, even though it does not address the larger question 
suggested by the bug summary, the WG believes the adoption of comment #4
resolves the issue, and I am so marking the bug.

Xan, if as the originator you could indicate by closing the issue that you
are satisfied wtih this resolution, or indicate by reopening the issue
that you are dissatisfied (and explain why), we would be grateful.  If
we don't hear from you in the next two weeks, we will assume that your
silence implies consent.
Comment 8 Xan Gregg 2008-05-31 15:18:42 UTC
Satisfied. Closing.