RE: Can types be marked as "deprecated"?

You could do the validation under the control of a schema-aware XSLT 2.0
transformation, which after validating its input file, puts it through a
dummy transformation:

<xsl:template match="node()|@*">
  <xsl:apply-templates select="node()|@*"/>
</xsl:template>

<xsl:template match="element(*, deprecated-type-1)|attribute(*,
deprecated-type-1)">
  <xsl:message>Warning: deprecated type used</xsl:message>
  <xsl:next-match/>
</xsl:template>

You could also generate this stylesheet based on appinfo entries in the
schema itself.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Tino Breddin
> Sent: 21 April 2006 11:29
> To: xmlschema-dev@w3.org
> Subject: Can types be marked as "deprecated"?
> 
> 
> Hi,
> i am looking for a possibility to mark special types, which i 
> want to delete later, as deprecated, so that the user, who 
> validates his xml file against the schema gets a warning like 
> "Warning: Type ... is DEPRECATED, use ... instead".
> I did not find any information, that XSD provides such a 
> feature. Does anyone know a workaround how to achieve this?
> 
> Thanks in advance,
> Tino
> 
> 
> 

Received on Friday, 21 April 2006 13:42:02 UTC