Schematron | <sch:rule context="tei:*[@validUntil]"> <sch:assert test="@validUntil cast as xs:date ge current-date()"> <sch:value-of select="if (@ident) then concat('The ',@ident) else concat('This ',local-name(.),'
of ',ancestor::tei:*[@ident][1]/@ident)"/> construct is outdated (as of <sch:value-of select="@validUntil"/>); ODD processors may ignore it, and it should probably be removed</sch:assert> <sch:report test="@validUntil cast as xs:date eq current-date()"> <sch:value-of select="if (@ident) then concat('The ',@ident) else concat('This ',local-name(.),'
of ',ancestor::tei:*[@ident][1]/@ident)"/> construct will be outdated as of tomorrow; ODD processors may then ignore it, and thus it should probably be removed soon</sch:report></sch:rule> <sch:rule context="tei:*[@validUntil]"> <sch:assert test="(@validUntil cast as xs:date - current-date()) lt (30*xs:dayTimeDuration('P1D'))"> <sch:value-of select="if (@ident) then concat('The ',@ident) else concat('This ',local-name(.),'
of ',ancestor::tei:*[@ident][1]/@ident)"/> construct is outdated (as of <sch:value-of select="@validUntil"/>); ODD processors may ignore it, and it should probably be removed</sch:assert> <sch:report test="@validUntil cast as xs:date eq current-date()"> <sch:value-of select="if (@ident) then concat('The ',@ident) else concat('This ',local-name(.),'
of ',ancestor::tei:*[@ident][1]/@ident)"/> construct will be outdated as of tomorrow; ODD processors may then ignore it, and thus it should probably be removed soon</sch:report></sch:rule>
|
Note | Technically, this attribute asserts only the intent to leave a construct in future releases of the markup language being defined up to at least the specified date, and makes no assertion about what happens past that date. In practice, the expectation is that the construct will be removed from future releases of the markup language being defined sometime shortly after the validUntil date. An ODD processor will typically not process a specification element which has a validUntil date that is in the past. An ODD processor will typically warn users about constructs which have a validUntil date that is in the future. E.g., the documentation for such a construct might include the phrase warning: deprecated in red. |