[Bug 9734] default initial template

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

--- Comment #2 from Michael Kay <mike@saxonica.com> 2012-05-17 17:09:37 UTC ---
I think this is a good idea in principle, but there are details that need to be
worked out. It's difficult to define exactly what it means without a concrete
API in mind. 

(1) Are we imagining that there are now three principal ways of starting the
transformation:

(a) apply-templates to the initial context item

(b) call-template of a specific named template

(c) call-template of the default initial template

and that in the API, the caller would have to be clear which of these three is
intended?

(2) Putting something as an attribute on xsl:stylesheet raises questions about
multiple stylesheet modules and how different values of this attribute should
interact. From this point of view, I think it would be better to have an
attribute on xsl:template that labels the template as the initial entry point.
It would then be subject to import precedence, with an explicit error if more
than one template at the same (highest) precedence is so labelled.

I'm a little inclined to suggest a no-new-syntax solution that says if the
stylesheet is invoked as in (c) above, the initial template name is the
template called "xsl:main". If it's good enough for C and Java, why can't it be
good enough for us?

-- 
Configure bugmail: https://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, 17 May 2012 17:09:43 UTC