[tei-council] tricky situations for using @validUntil

Syd Bauman s.bauman at neu.edu
Tue Dec 10 14:26:46 EST 2013


> When I did the cleanup of "no longer recommended" and "deprecated"
> practices back in June, there were three places in which I couldn't
> figure out where to insert @validUntil:
> a) https://sourceforge.net/p/tei/feature-requests/294/#5737

This is kinda tough.

basic problem
----- -------
We've decided to deprecate use of <altIdentifier> as a child of
<msPart> -- but note we're not deprecating the *element*, just this
particular use.

It's pretty easy to change <msPart> so <altIdentifier> is not
allowed. It's pretty easy to write a Schematron rule that says "don't
do this, in the future it won't be allowed". But (as we've currently
defined it) there is no place to put the @validUntil. Three possible
solutions jump to mind:

1. change the semantics of @validUntil on <constraintSpec>
-- ------ --- --------- -- ----------- -- ----------------
Putting a @validUntil on a <constraintSpec> right now, while not
completely crazy, is not likely to be a common occurrence. It would
mean "we plan to take away this constraint in the future". But if we
want to take a constraint away, since it doesn't invalidate anybody's
documents or cause any other mayhem, in general we'd just do it
without a deprecation process.

So I don't think it would be a big problem to lose the current
functionality of constraintSpec/@validUntil. So we could change the
meaning of constraintSpec/@validUntil to "this constraint warns about
something that will become an outright error after YYYY-MM-DD". In
which case, perhaps it should be called @errorAfter.

One of the nice side-effects of this is that we may be able to have
the build process incorporate the constraintSpec/@validUntil value
into the message that the ISO Schematron in the <constraintSpec>
produces, e.g. by using something like <tei:date type="errorAfter"/>.

2. change the semantics of @validUntil on a model class
-- ------ --- --------- -- ----------- -- - ----- -----
Right now I don't think we know what it means, if anything, to have a
@validUntil on <classSpec type=model>. So let's make use of it to
mean "where this model occurs in a content model -- that's bad". If

Thus, we create a new class, model.msPartPartDeprecated (or whatever)
which has 1 member, <altIdentifier>. We refer to this model in only
one place (from the content of <msPart>), and put @validUntil on the
<classSpec> that defines it. It's an honest use of @validUntil -- the
class is going to go away after the expiration date.

I *think* we can even get Schematron code to flag this usage in an
instance. 

3. just don't bother with @validUntil
-- ---- ----- ------ ---- -----------
Put prose warnings to users in the <remarks> for <msPart> and for
<altIdentifier>. (It's already there in the former.) Put a warning
message to users about the usage of msPart/altIdentifier in ISO
Schematron code in a <constraintSpec>. Use the same date in all three
places, and stop worrying about @validUntil.


More information about the tei-council mailing list