[Bug 29982] [XSLT30] What is this Note, comparing tunnel params with variables in functional languages referring to?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29982

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
The editor was asked to attempt to provide a little more context and rationale
for the Note. I have redrafted it as follows:

<note>  
<p>Tunnel parameters are conceptually similar to the dynamically scoped
variables found in some   functional programming languages (for example, early
versions of LISP), where evaluating a   variable reference involves searching
down the dynamic call stack for a matching variable   name. There are two main
use cases for the feature:</p>   
<olist>   <item>    <p>They provide a way to supply context information that
might be needed by many  templates (for example, the fact that the output is to
be localized for a particular  language), but which cannot be placed in a
global variable because it might vary  from one phase of processing to another.
Passing such information using conventional  parameters is error-prone, because
a single <elcode>xsl:apply-templates</elcode> or 
<elcode>xsl:call-template</elcode> instruction that neglects to pass the 
information on will lead to failures that are difficult to diagnose.</p>  
</item>
    <item>    <p>They are particularly useful when writing a customization
layer for an existing  stylesheet. For example, if you want to override a
template rule that displays  chemical formulae, you might want the new rule to
be parameterized so you can apply  the house-style of a particular scientific
journal. Tunnel parameters allow you to  pass this information to the
overriding template rule without requiring  modifications to all the
intermediate template rules. Again, a global variable could  be used, but only
if the same house-style is to be used for all chemical formulae  processed
during a single transformation.</p>   </item>  </olist>   
</note>

This text has been applied to the spec. Leaving the bug open for WG review.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 11 November 2016 09:46:09 UTC