Thanx to both of you, both ways work. I know, that it's not possible to alter a value of a variable (aka constant). I read somewhere, that it's possible to change the value as long as it has not been set...bit maybe i got something wrong.
Cheers, nils > -----Ursprüngliche Nachricht----- > Von: Joerg Heinicke [mailto:[EMAIL PROTECTED] > Gesendet: Samstag, 10. April 2004 10:32 > An: [EMAIL PROTECTED] > Betreff: Re: Debian Bug vs. WinXP noBug > > > On 10.04.2004 10:14, Nils Köster wrote: > > Hi all, > > > > a strange thing ist happening: > > > > On Windows XP, Cocoon 2.1.4 has no problems with the > following code, > > on debian linux cocoon 2.1.4 says: > > Sounds like different processors are in use. Endorsed libs? > > > " > > Failed to execute pipeline. > > > > org.apache.cocoon.ProcessingException: Failed to execute pipeline.: > > java.lang.RuntimeException: Can not convert #STRING to a NodeList! > > > > cause: java.lang.RuntimeException: Can not convert #STRING to a > > NodeList! " > > > > > > The Code: > > " > > <xsl:variable name="project_list"/> > > <xsl:choose> > > <xsl:when test="$client = ''"> > > <xsl:variable name="../project_list" > select="/projects/project"/> > > </xsl:when> > > <xsl:otherwise> > > <xsl:variable name="../project_list" > > select="/projects/project[client=$client]"/> > > </xsl:otherwise> > > </xsl:choose> > > > > <xsl:for-each select="$project_list"> > > > > (...) > > " > > > > Does anyone have a clue on this one? > > Completely illegal code, on all XSLT processors. > 1. variable name "../project_list" > 2. The outer variable $project_list is empty. If it will be "filled" > with a value, it's either a string or a result tree fragment, > not a node > list (or node set, what is the better word IMO). > > What you want to do seems to be to set the variable $project_list > differently depending on $client, just like a filter. If it > is not set, > you want to have all clients. > > <xsl:for-each select="/projects/project[client = $client] | > > /projects/project[not(normalize-space($client))]"> > > should do it. > > If the jumps were to big, feel free to ask more. > > Joerg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]