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

> 
> Above states, quote
> If no initial context node is supplied, then the context item, context
> position, and context size will initially be unset,  ....
> 
> It fails to state how an initial context node is supplied.
> It also fails to state how a named template or node are supplied.
> 
> Guessing this might be along the lines of a parameter, then 
> how it gets
> into the stylesheet is implementation dependent.
>  
> How are these specified within the stylesheet?
> That should not be implementation dependent, 
> since subsequent processing may well depend on the selected 
> initial context
> node.
> 
> If an initial mode is supplied, the WD appears not to state how the
> context node is determined.
> 

The way in which starting conditions are supplied to the transformation is a
question for the API design, which is outside the scope of the language
specification. For example, if you are using JAXP 1.2, then the initial
context node is the document node at the root of the document supplied as a
StreamSource or SAXSource, or the DOM Node wrapped by a DOMSource. JAXP has
no current provision to supply an initial mode or an initial named template,
but we would expect this capability to be added. The current Microsoft APIs
allow you to specify an initial node and an initial mode, but not an initial
named template.

The initial mode and the initial context node are quite independent of each
other.

I may have missed the point of what you are asking for, because I don't see
how we can possibly avoid the method of supplying initial information to the
stylesheet being implementation-dependent, unless we standardize an API,
which is outside our scope.

Michael Kay 

Received on Thursday, 1 April 2004 10:20:20 UTC