|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Deprecating XSLT templates
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








