[Bug 9277] New: Allow client application to set initial template parameters

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9277

           Summary: Allow client application to set initial template
                    parameters
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: XSLT 2.1
        AssignedTo: mike@saxonica.com
        ReportedBy: maxtoroq@gmail.com
         QAContact: public-qt-comments@w3.org


http://www.w3.org/TR/xslt20/#initiating states:

"Parameters passed to the transformation by the client application are matched
against stylesheet parameters (see 9.5 Global Variables and Parameters), not
against the template parameters declared within the initial template. All
template parameters within the initial template to be executed will take their
default values."

I cannot think of any good reasons for this restriction. If we can choose an
entry point then why cannot we provide parameters for it?

Using globals as defaults isn't really a solution, since that would restrict
the set of templates with parameters to choose from to one, the one whose
parameters are duplicated as global parameters.

This restriction helps to enforce that stylesheets have a single purpose, while
they could have many purposes based on related functionality. Like
object-oriented languages, you can call a class constructor passing parameters
(global parameters in XSLT) and then call a method passing other parameters
(initial template parameters). Removing this small restriction will expand the
amount of functionality a stylesheet author can offer to client applications.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 18 March 2010 17:51:20 UTC