<xsl:for-each select="/projects/project[client=$client]|/projects/project[$client = '']">
Joerg wrote:
>><xsl:for-each select="/projects/project[client = $client] | >>/projects/project[not(normalize-space($client))]">
On 10.04.2004 11:20, Nils Köster wrote:
Thanx to both of you, both ways work.
Askild's and my expression are conceptionally equal. They way it works is simple: [expression] are called predicates. node[expression] is only selected if the predicate evaluates to true. This is the case if $client matches client for the first part of the expression when the projects are filtered. And the second part evaluates to true if $client is "empty". Askild's expression tests exactly for empty string, I use the normalize-space() for the case $client contains whitespaces.
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.
Sounds like a paradoxon :) If you think of it like Java's final, that's false.
<xsl:variable name="test"/>
...
<xsl:choose> <xsl:when test="expression"> <xsl:variable name="test" select="test"/> </xsl:when> <xsl:otherwise> <xsl:variable name="test" select="test2"/> </xsl:otherwise> </xsl:choose>
will not work.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]