[Bug 3945] Ability to "deprecate" elements in a schema

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3945


cmsmcq@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #1 from cmsmcq@w3.org  2007-03-01 00:30 -------
Sorry for the lack of response to the issue you raise.  The following
comments reflect my individual views; I am not speaking for the
WG or any organization.

At the moment, you can add

 <xsd:annotation>
  <xsd:appinfo>
   <my:deprecate date="2006-11-02" level="2"/>
  </xsd:appinfo>
 </xsd:annotation>

to the declaration of each element or type you wish to
deprecate.  Or more simply, you can add attributes to the
declarations:

  <xsd:element name="unit" my:status="deprecated">
    ...
  </xsd:element>

Any processor which provides access to the full PSVI 
will point from the element to the governing element
declaration and governing type definition, and you can
check the appinfo to see if the element is deprecated
or allowed.  (Alternatively, it would not be terribly
difficult to write an XSLT stylesheet to read schema
documents in which deprecations are marked in this way,
and generate an XSLT stylesheet which reads instances and
generates messages when it sees deprecated elements or
types.  That way you don't need access to the full PSVI.) 

But I assume you already knew that, and that you don't want
to do that, but have the deprecation somehow understood and
processed by the schema-based validator.

What would you like the schema processor to do with 
deprecated elements?  Accept them, since they are after all
valid?  Reject them, since they are after all deprecated?
Support a run-time switch to reject, or to raise a warning
when it sees, deprecated elements or types in use?

Signaling that something has been deprecated is clearly an
important part of managing a vocabulary.  But it's not immediately
clear, at least to me, what effect such deprecation might or
should have on schema-validity assessment.  Your thoughts on this
topic would be welcome.  I don't want to promise much -- XML
Schema 1.1 is long overdue and the Working Group may well wish
not to undertake any new work.  But if you have specific proposals,
I'd like to hear them.

Received on Thursday, 1 March 2007 00:30:26 UTC