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

Re: xsl:initial-template

Subject: Re: xsl:initial-template
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Thu, 1 May 2014 14:15:03 -0000
Re:  xsl:initial-template
On 1 May 2014 04:40, Max Toro <maxtoroq@xxxxxxxxx> wrote:
> If I understand correctly, in XSLT 3.0 you can initiate a
> transformation at a named template, but you are not required to
> provide a name because it uses "xsl:initial-template" as default. This
> replaces the convention of using "main" or any other kind of
> convention. Is this correct?

It's not to replace the traditional way of supplying an initial
template, it's an additional feature to allow us as stylesheet writers
to default the execution starting point in "standalone" stylesheets
(transforms that pull in the source data they use and don't require
user supplied input).

For example, imagine you had an xslt that pulled in some data from
various places and then created some reports.  If you gave that to
someone else to run repeatedly, you would currently need to also
supply a way of running it or explain how to supply the initial
template or how to run it against itself... it's a bit fiddly.  With
this new instruction you can just give them the xslt, and say "run
this".   It's not beyond the realms that they then run it by double
clicking it, or opening it in their browser etc.



-- 
Andrew Welch
http://andrewjwelch.com

Current Thread

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
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.