You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by sa...@ca.ibm.com on 2003/01/16 23:16:39 UTC

feature http://apache.org/xml/features/validation/dynamic

Hi all,

There seems to be some disagreement between the description of this feature
and its implementation.

The description [1] (along with that of the feature
"http://xml.org/sax/features/validation" [2]) seems to indicate that if you
want dynamic validation, you only need to turn on the dynamic validation
feature, but not the validation feature.

But in the implementation, for dynamic DTD validation to happen, both
features need to be turned on. The implementation of Schema validation, on
the other hand, does work as what the description says: turning on dynamic
validation is sufficient to get the behavior.

So what should we do here? Fix DTD validation so that it doesn't require
both features to be turned on? Or fix the feature description and Schema
implementation? (I talked to some of the committers privately, but didn't
come to a consent. :-( )

The difference between the 2 interpretations only appears when the
validation feature is off, but the dynamic validation feature is on. My
preference would be to fix the DTD validation so that we perform dynamic
validation in the above case. This would make our documentation and
implementation more consistent.

One may fear such change might break some people. But when a user turns on
the dynamic validation feature (whether the validation feature is on or
off), he's expecting something to happen, isn't he? So I don't think we
would actually break anybody.

[1] http://xml.apache.org/xerces2-j/features.html#validation.dynamic
[2] http://xml.apache.org/xerces2-j/features.html#validation

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: feature http://apache.org/xml/features/validation/dynamic

Posted by Andy Clark <an...@apache.org>.
sandygao@ca.ibm.com wrote:
> One may fear such change might break some people. But when a user turns on
> the dynamic validation feature (whether the validation feature is on or
> off), he's expecting something to happen, isn't he? So I don't think we
> would actually break anybody.

You would still break people. For example, an app
written with the current Xerces requires that both
validation and validation/dynamic be turned on for
the dynamic validation to work. If their application
turns off validation, then currently *no* validation
occurs, dynamic or no.

However, if we made this change, when they upgrade
to the latest Xerces, the parser starts validating
documents that it previously wasn't. I would consider
this broken because the expected behavior no longer
holds.

We're not just fixing a "bug" here, we're changing
behavior. If the parser was behaving incorrectly
before, then I would agree with you and tell users
that they have to change their code because the
parser was faulty. But this is not the case.

-- 
Andy Clark * andyc@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org