cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bierenfeld <michael.bierenf...@atmiralis.de>
Subject Re: xsp, xsl-vaiables and xsl-attributes
Date Wed, 28 Jun 2000 06:29:47 GMT
Hans-Guenter Stein wrote:
> 
> Why can't I compute <xsp:expr> inside an <xsl:variable>?
> 
> i.e.
> if I try:
> <xsl:variable name="myVariable"><xsp:expr>0+1</xsp:expr></xsl:variable>
> 
> $myVariable will hold "0+1" instead of 1.
> 
> if I try:
> <myContent>
> <xsl:attribute
> name="myAttribute"><xsp:expr>0+1</xsp:expr></xsl:attribute>
> </myContent>
> 
> the processor throws something like 'can't have <xsp:expr> inside
> <xsl:attribute>
> 
> ----
> In fact, I want to do the following (which appears to be a very basic
> problem):
> 
> my xml looks like:
> <page>
>  <pageContent language="en">
>   This is English
>  </pageContent>
>  <pageContent language="ge">
>   This is German
>  </pageContent>
> </page>
> 
> in the xsp, I want to analyse the page-request-paramters with the
> cocoon-lib 'request' by using:
> <request:get-parameter-values name="language"/>
> (the page request looks like: "http://myServer.com/myXML?language=en")
> 
> now I want to write a template for <pageContent>, that copies the
> correct language version into the output, such that, in above case, the
> output should be exactly:
> <page>
>  <pageContent language="en">
>   This is English
>  </pageContent>
> </page>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


I had the same thing. I dont know the reason but
anyway. In nearly all cases it is possible to do
the same thing with :


	<label ......>
		<xsp:attribute name="content">
			<xsp:expr>language.getText (...)</xsp:expr>
		</xsp:attribute>
	</label>

This means labels etc are stored externaly in a
Textfile or something simmilar.

Regards

Michael

Mime
View raw message