[xmlschemata] Re: Support of warnings by schema languages

From: Rick Jelliffe <ricko@topologi.com>
Date: Fri Jun 28 2002 - 11:20:21 UTC

From: "Eric van der Vlist" <vdv@dyomedea.com>
=20
> Isn't it one of the cases where it would be nice to have a notion of
> "warning" and add a third state to the result of a validation which is
> currently a binary true|false ?

I think validation is actually a two-aspect process:

  1) go through the nodes-of-interest in a document evaluating them
   against the schema
  2) take the results of evaluation and apply some validity function and =
present
    the result to the application.

So binary valid/invalid is one possible validity function.=20

This notion is built into WXS, with the notion that validity is just one
of the possible outcomes of schema-assessment (or is it =
schema-processing)
of a document.

Schematron only provides information for 1). You can add a role
attribute to assertions that can let an application know the =
significance
of that assertion (caution, etc). You can specify a particular icon
for the error, to give better visual indication, and mostly you can use
phases (so one phase is a warning phase, etc).=20

So I think that most schema languages provide one built-in validity
function (returning true|false) but also support other =
application-dependent=20
functions. =20
 =20
> Anyway, before investigating further, the question is probably to know
> if there is a real requirement for this feature!

The most likely candidate for such a feature is to be able to mark
things as obsolete or deprecated, thereby allowing smoother
migration.=20

Apart from phases, schema languages so far have not really reconstructed =

the marked section feature of DTDs. WXS tacked on=20
unmanaged <redefine> at the last minute, and that recent
stages idea would go a bit of the way.

I wonder if we need to have a three layer model for invoking a =
particular
schema pipeline:

1) A phase selector switches on-or-off various piplines.
2) A version selector remaps parameters
3) the pipeline itself.

This is because versioning is really a distinct issue from
the phase of validation. To be more concrete:

<schemachine>
    <phase name=3D"simple">
        <active process=3D"s1"/>
    </phase>
    <phase name=3D"extended">
        <active process=3D"s2"/>
    </phase>=20

     <validator name=3D"s1" engine=3D"relaxng" >
        <param name=3D"schema">xxx.rng</param>
    </validator>
     <validator name=3D"s2" engine=3D"relaxng" >
        <param name=3D"schema">xxx2.rng</param>
    </validator>

    <version name=3D"original" />
    <version name=3D"new">
        <override processor=3D"s1">
            <param name=3D"schema">xxx3.rng</param>
        </override>
    </version>
</schemachine>

In that case, the idea is that the version element allows
parameters of processors to be overridden. So to=20
validate I must specify a particular version and a particular
version. =20

The changed parameter could nominates a different schema,
or the particular validation engine could itself know how to construct
the schema (e.g. using xsvif or stages).=20

Cheers
Rick Jelliffe
Received on Fri Jun 28 13:05:58 2002

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC