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

Re: Deprecating XSLT templates

  • From: tpassin@h...
  • To: xml-dev@l...
  • Date: Thu, 05 Oct 2000 23:23:05 -0400

schematron conditionals
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.