W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2010

[Bug 7410] [XSLT 2.1] Declare context item for a named template

From: <bugzilla@jessica.w3.org>
Date: Thu, 18 Nov 2010 16:42:57 +0000
To: public-qt-comments@w3.org
Message-Id: <E1PJ7ZZ-00014L-8y@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7410

--- Comment #2 from Michael Kay <mike@saxonica.com> 2010-11-18 16:42:56 UTC ---
I propose that xsl:template should have a permitted child element
xsl:context-item, to appear optionally before any xsl:param elements, with the
syntax

<xsl:context-item
  use = required|optional|prohibited
  as? = ItemType />

If the template is unnamed, then use=required is the only permitted value.

If use=prohibited is specified then the as attribute must be absent.

The element declares requirements on the context item, whether the template is
invoked by match or by name. The use attribute declares whether the context
item is required or optional; the value prohibited indicates that the context
item is set to absent on entry to the template (it does not mean that it's an
error if there is a context item at the time of the call).

If there is a context item supplied by the caller, then it must match the given
item type; otherwise a type error occurs.

-- 
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 November 2010 16:43:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:08 GMT