W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2012

[Bug 9734] default initial template

From: <bugzilla@jessica.w3.org>
Date: Thu, 17 May 2012 17:09:37 +0000
To: public-qt-comments@w3.org
Message-Id: <E1SV4Cn-0001qz-JG@jessica.w3.org>

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

(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

(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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:38 UTC