[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can types be marked as "deprecated"?

From: Michael Kay <mike@saxonica.com>
Date: Fri, 21 Apr 2006 14:41:51 +0100
To: "'Tino Breddin'" <s9600916@inf.tu-dresden.de>, <xmlschema-dev@w3.org>
Message-ID: <00dc01c66549$5876da80$6401a8c0@turtle>
tino breddin

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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.