att.deprecated

att.deprecated provides attributes indicating how a deprecated feature will be treated in future releases.
組件 tagdocs — Documentation Elements
成員 att.combinable [att.identified [attDef classSpec constraintSpec dataSpec elementSpec macroSpec moduleSpec paramSpec schemaSpec] defaultVal remarks valDesc valItem valList]
屬性
validUntil⚓︎ provides a date before which the construct being defined will not be removed.
狀態 非必備的
資料類型 date
Schematron

<sch:rule context="tei:*[@validUntil]">
<sch:let name="advance_warning_period"
 value="current-date() + xs:dayTimeDuration('P60D')"/>

<sch:let name="me_phrase"
 value="if (@ident) then concat('The ', @ident ) else concat('This ', local-name(.), ' of ', ancestor::tei:*[@ident][1]/@ident )"/>

<sch:assert test="@validUntil cast as xs:date ge current-date()">
 <sch:value-of select="concat( $me_phrase, ' construct is outdated (as of ', @validUntil, '); ODD processors may ignore it, and its use is no longer supported' )"/>
</sch:assert>
<sch:assert role="warning"
 test="@validUntil cast as xs:date ge $advance_warning_period">

 <sch:value-of select="concat( $me_phrase, ' construct becomes outdated on ', @validUntil )"/>
</sch:assert>
</sch:rule>
Schematron

<sch:rule context="tei:*[@validUntil][ not( self::tei:valDesc | self::tei:valList | self::tei:defaultVal | self::tei:remarks )]">
<sch:assert test="child::tei:desc[ @type eq 'deprecationInfo']"> A deprecated construct should include, whenever possible, an explanation, but this <sch:value-of select="name(.)"/> does not have a child <desc type="deprecationInfo"></sch:assert>
</sch:rule>