Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 65303 invoked by uid 500); 5 Mar 2003 18:16:14 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 65290 invoked from network); 5 Mar 2003 18:16:14 -0000 Received: from mail.gmx.net (213.165.65.60) by daedalus.apache.org with SMTP; 5 Mar 2003 18:16:14 -0000 Received: (qmail 14511 invoked by uid 0); 5 Mar 2003 18:16:16 -0000 Received: from a183069.studnetz.uni-leipzig.de (HELO gmx.de) (139.18.183.69) by mail.gmx.net (mp007-rz3) with SMTP; 5 Mar 2003 18:16:16 -0000 Message-ID: <3E663EF4.5080903@gmx.de> Date: Wed, 05 Mar 2003 19:16:20 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: de-de, de, en, en-us MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: XSLT: How does Cocoon use the context position ? References: <3E663A9B.8DE67B34@desy.de> In-Reply-To: <3E663A9B.8DE67B34@desy.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello Rainer, XSLT 2 is only a working draft, so no recommendation. Not many xslt processors exist, which support XSLT 2. Xalan 2.3/2.4 does not, but is used in Cocoon. It supports XSLT 1. Even if I have not been reading anything about XSLT 2, I'm sure it has nothing to do with it. I can not imagine that this behaviour changes between the two versions. The context has not changed at the point, where you use and position(), so position() returns the context position of AwFall as you already have found out. But when you have a template matching on and when you use position() there, you will get the expected behaviour. Changing context and so the return value of position() already in makes no sense in my opinion. Regards, Joerg Rainer Ammermann wrote: > Hello, > > the W3C says in XSLT 2.0: > > "[...] When an instruction such as xsl:apply-templates or > xsl:for-each is used to process a sequence of items, the first item in > the sequence is processed with a context position of 1, the second item > with a context position of 2, and so on. The context position is > returned by the XPath expression fn:position()." > > I tried it with cocoon 2/tomcat 4.1 , but it doesn't work within the > -element. Instead it takes the position of the node > matched by the template. When I added an iteration with , > it worked fine. > Anything wrong with my code or with cocoon ? > > > > > > > > With this the parameter 'map' is set to the position of not of > , which is actually needed. > > Thanks for any idea ! > > Rainer Ammermann > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org > For additional commands, e-mail: cocoon-users-help@xml.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-users-help@xml.apache.org