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

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 UTC