comments on last-call draft of DOM Level 3 Validation (very late)

My profuse apologies for sending in a last-call review so
long after the deadline for comments.   In the hopes that
they may still be of use, however, I append some comments
on the spec.

These are personal comments for which no other individual
or organization bears responsibility.  (I have also forwarded
them to the task force working to prepare a review of the spec
for the XML Schema WG, so some of them may be repeated if
and when that WG sends its comments.)

My reading of the spec has been quick and necessarily
cursory in places; please bear with me if I have simply
misunderstood something.

-C. M. Sperberg-McQueen

Notes on DOM Level 3 Validation

http://www.w3.org/TR/2002/WD-DOM-Level-3-Val-20021008/DOM3-Val.html

Note: I am assuming the intention is for this API to support
validation using XML Schema.  If this is not the intention, my one
comment is that it should be.  If it is the intention, then I have
more.

The feature identifier "VAL-DOC" is troublesome; surely names used to
identify features of this kind should be namespace-qualified and in
some W3C namespace.

Section 1.3, Interface DocumentEditVAL, definition of attribute
continuousValidityChecking:  for 'if free' read 'is free'.

Interface NodeEditVAL, method isNodeValid.  My first reaction is to
say this should return something other than a boolean, to deal better
with the variety of results that can come back from schema-validity
assessment.  (See
http://www.w3.org/People/cmsmcq/2001/validation-results and
http://www.w3.org/XML/Group/2001/06/validity-outcomes for overviews.)

It occurs to me, though, that perhaps it's just a question of calling
the method with the right parameters.  If we use 'va' for [Validation
attempted] and 'v' for [Validity], we have for node n:

   va='full' v='valid' iff n.isNodeValid(true,STRICT_VALIDITY_CHECK)
   va='full' v='invalid' iff not n.isNodeValid(true,STRICT_VALIDITY_CHECK)
   va='partial' v='valid' iff ... what?
   va='partial' v='invalid' iff ... what?
   va='partial' v='notKnown' iff we haven't run n.isNodeValid() but we
        have validated at least one descendant
   va='none' v='notKnown' iff we haven't run n.isNodeValid()

It's not clear to me how the parameters 'deep' and
'wFValidityCheckLevel' should be used to inquire about
schema-validity.  I think an explicit discussion of how these
parameters relate to the values in the PSVI would be very helpful.

Interface ElementEditVAL, attribute definedElementTypes -- it's not
clear why this attribute is limited to elements which are in the same
namespace as the element whose attribute this is.  (That is what it
says, isn't it?)  It is not the case that parents in a given namespace
can have only children from the same namespace; neither DTDs nor
schemas makes such a restriction, nor should they.

Methods isElementDefined and isElementDefinedNS: these seem to need
further elaboration to explain how they work if the element is
declared local to some complex type: it may not be defined in the
given namespace, and even if it's in the namespace, it might collide
with a top-level element in the same namespace and of the same name;
is that likely to cause a problem?

Glossary: definition of 'partially valid' should probably say whether
the children need to be valid or partially valid or not, in order for
the parent to be partially valid.  (We assume they only have to have
the prescribed names, but it would be nice to be sure.)

Glossary: 'partially valid' is defined, but 'strict validity' is also
used as a technical term and lacks a definition.  It should be
defined.  

Received on Monday, 3 February 2003 21:51:12 UTC