OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Deprecating XSLT templates

[ Lists Home | Date Index | Thread Index ]
  • From: tpassin@home.com
  • To: xml-dev@lists.xml.org
  • Date: Thu, 05 Oct 2000 23:23:05 -0400

Tim McCune's been talking about "deprecating" templates.
>
> Ok, here's a super-quick example:
>
> <xsl:template name="a">
> <xsl:message>Template a is deprecated.  Use template b
> instead.</xsl:message>
> </xsl:template>
>
> <xsl:template name="b"/>
>
> So, we _are_ talking, more or less, about an API.  Other stylesheets
> can call into these named templates, and we're trying to discourage
> them from using certain templates without breaking their
> functionality.  We're not talking about overriding, and we're not
> talking about overriding an entire stylesheet, just individual
> templates.
>
 The trouble with this is that the output has undesired text.  When do you
find out about deprecated things in, say, java?  When you try to compile (or
maybe create statements) in a development IDE, that's when.  It's
***developer*** actions that should trigger the notice, and developers who
should get notifications.

One way to do this would be for the developer to test the stylesheet with
special xml file, or possibly another special stylesheet.  It's starting to
sound like Schematron.  You might have to build conditionals into the
templates, but maybe a file of assertions would be sufficient.  Thus, if a
Schematron-like stylesheet found template "a", it would issue a warning
notice.  The stylesheet author would distribute the extra probe file
together with the stylesheet for each new version.

You can't cause current xslt processors to throw exceptions whenever you
want, can you? -- not counting bad syntax, I mean --.  But maybe the right
IDE could combine some of these ideas and do it for you... one of these
days...

Cheers,

Tom Passin





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS