cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject using xsl:copy-of inside xsp:logic tag
Date Thu, 01 Jan 1970 00:00:00 GMT
In documentation of Cocoon (\docs\userdocs\xsp\logicsheet-
concepts.html) I found this sample code:

<xsl:template match="sql:create-connection">
<!-- *** Argument collection skipped for the sake of brevity *** -->
    <xsl:copy-of select="$name"/>,
    <xsl:copy-of select="$connect-url"/>,
    <xsl:copy-of select="$user-name"/>,
    <xsl:copy-of select="$password"/>,

However I was trying to find similar code in samples but I don&#8217;t 
see anything like this. In all samples code only xsp tags are used 
inside logic tag not standard xsl tags.

I&#8217;m try to do something similar. 
First I set XSL variable like this:
<xsl:variable name="loc-w"><xsl:value-of 

and then try to use it to pass value to method in by helper class 
like above. 
I was also trying to write something like this:

String s = <xsl:copy-of select="$loc-w"/>;

In this case I get: Error compiling: incompatible types Line 0, 
column 0: 1 error

If I change it to: String s = (String) <xsl:copy-of select="$loc-
I get: Error compiling: inconvertible types Line 0, column 0: 1 

This code then translated to Java is changed to:
String s = (String) 

Of course it is wrong because addAttribute() "return" void.
But how was it possible that code in documentation was working? 

Maybe there is some syntax problem here which could be quickly 
pointed by some more advanced users?
If not maybe somebody know how to in logicsheet take some 
attributes of one XML tag, and pass them to Java class, or use in 
inline code of XSP page.

Thanks for any help or suggestions.

Best regards,


Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message