Menu

#154 Remove the @usage attribute from <elementSpec>

GREEN
closed
nobody
5
2009-01-19
2008-12-09
Lou Burnard
No

The <elementSpec> element bears a usage= attribute, whose possible
values are:
req (required)
mwa (mandatory when applicable)
rec (recommended)
rwa (recommended when applicable)
opt (optional)
No mention of what this attribute means or of how to use it occurs in
either the tagdoc or in the prose of 22.4.4.

Does it have any effect on a generated schema? I am not aware of any,
but I have not tested extensively. There is no GUI to this attribute
in Roma the web application.

When an element is permitted because of membership in a model class,
I don't think its usage= attribute *can* have an effect on the
resulting RELAX NG schema. (Or at least not without heroic effort on
the part of the ODD processor to do things we probably wouldn't want
it to do.)

It is probably possible to have an ODD processor look to see if any
members of a class that is referred to in an element's content has
usage="req", and in that case write out a Schematron rule. But that
may be a lot of work, and would have an impact on the phrasing of
conformance, too. (Which changes I strongly recommend, anyway.)

I don't think the information imparted by this attribute is used in
our current reference documentation, either.

Discussion

  • Lou Burnard

    Lou Burnard - 2008-12-09

    This proposal was briefly discussed by council in Sept 2008. There was general agreement that the attribute was not used, and did not do anything that couldn't be done otherwise.

    DS notes "Just to clarify: we're talking here only about eliminating @usage from
    <elementSpec>, retaining it for <attDef>?
    Makes sense to me. Probably rarely used by anyone. However, in
    P5/Exemplars there are two files in which elementSpec[@usage] occurs:
    tei_allPlus.odd and tei_odds.odd [only in 1 place each], so validation
    will break if the attribute is removed from the schema until those files
    are updated. "

     
  • Lou Burnard

    Lou Burnard - 2009-01-14
    • milestone: 871209 --> GREEN
     
  • Lou Burnard

    Lou Burnard - 2009-01-14

    Pending implementation, I've removed the two uses (actually the same usage twice) from the Exemplars files.

     
  • Lou Burnard

    Lou Burnard - 2009-01-16

    Removed @usage attributes from all elementSpecs, along with equally redundant xml:ids at revision 5435

     
  • Lou Burnard

    Lou Burnard - 2009-01-19
    • status: open --> closed
     
  • Lou Burnard

    Lou Burnard - 2009-01-19

    checked for residual problems; all apparently removed by rev 5442, so closing this ticket.