cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: conditions in xsl
Date Wed, 11 Jun 2003 09:00:20 GMT
Maxime.Gheysen@swisscom.com wrote:
> Just a question about your code, I try to use parameter like you, but
> from another page. What is wrong here???
> 
> Sitemap :
> =========
> <map:transform type="xslt" src="test.xsl">
> 	<map:parameter name="use-request-parameters" value="true"/>
> </map:transform>	
> 
> XSL :
> =====
> 
> <xsl:variable name="password"><xsl:param
> name="password"/></xsl:variable>

This is completely wrong. You need a top-level <xsl:param/>:

<!-- empty string as default value -->
<xsl:param name="password" select="''"/>

> ...
> 	<user>
> 		<name><xsl:value-of select="cn"/></name>
> 		<password>normalize-space(password)</password>

Here you simply create text and not an expression. And you don't refer 
to the variable /password/, but to an element /password/. Change it to 
<password><xsl:value-of select="normalize-space($password)"</password>.

> 	</user>

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message