Re: [xsl] combining multiple documents

Subject: Re: [xsl] combining multiple documents
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Sun, 27 Jan 2008 11:06:56 -0500
On Sun, 2008-01-27 at 07:52 -0800, Steven Ericsson-Zenith wrote:
> I have read the spec but I am obviously not as familiar with it as  
> those that specified it. I admit, I am more comfortable with certain  
> other well-known terminology.
> 
> I do - at least I think I do - understand the implementation, I am  
> just expressing a discomfort with the counter intuitive nature of the  
> third parameter in key.
> 

I think it is strange in Lisp/Scheme to do:

(* 2 3)

to multiply 2 and 3, when from grade school I was taught to do 2 * 3

but if I want to write in that language, that is what I have to do.

It is what it is.


> With respect,
> Steven
> 
> 
> On Jan 27, 2008, at 2:18 AM, Michael Kay wrote:
> 
> >> My primary concern, in this case, relates to the scope of
> >> keys. If a key name is specified in a style sheet as some
> >> global name, I am a little concerned that the name is context
> >> sensitive.
> >>
> >
> > Have you read the specification? I suspect you wouldn't be using the  
> > word
> > "key" like that if you had.
> >
> > A key definition is a set of xsl:key declarations sharing the same  
> > name. Key
> > definitions are global, and they are not context sensitive.
> >
> > The effect of the key() function with three arguments key(N, V, R)  
> > is to
> > select all nodes that match the match pattern of one of the key  
> > declarations
> > in the key definition named N, that are descendants-or-self of R,  
> > where the
> > result of evaluating the use expression of the key declaration, with  
> > N as
> > the context node, returns a sequence containing an item that is  
> > equal to one
> > of the items in V.
> >
> > The effect of key() with two arguments key(N, V) is the same as  
> > key(N, V,
> > (/)). That is, the third argument defaults to "/", which returns the  
> > root of
> > the tree containing the context node. That is context sensitive, by  
> > virtue
> > of the definition of "/".
> >
> > Michael Kay
> > http://www.saxonica.com/

Current Thread