cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: XSP could not compile error - Cocoon 1.8 Dev
Date Sat, 09 Sep 2000 20:35:36 GMT
"HuiSion Teh" <huision@magix.com.sg> wrote:
>The following code is ok:
>	<para>
>		<xsp:attribute name="font">red</xsp:attribute>
>		This is a test
>	</para>
>
>The following code is NOT ok and generate the attached error:
>	<util:include-uri>
>		<xsp:attribute name="href">http://localhost:8080/test.xml</xsp:attribute>
>	</util:include-uri>
>
>I suspect there is a bug in the util taglib or bug in my use of Java 1.3.0
>Linux beta from SUN.

Neither. XSP processes things in a specific order:

XML -> [Logicsheets (including xsp-java.xsl, which always comes last)] -> 
Java source file -> [Javac or Jikes Compiler] -> Java class -> Generated XML

The xsp:attribute is specifically designed to be executed at the penultimate 
stage shown. It generates output attributes, not input attributes. You are 
trying to generate an input attribute using an "output attribute generator".

To be fair, the distinction is not made clear in the documentation. I find 
it confusing myself, and I've been using Cocoon for 6mths! :)

You can use either of these forms:

<util:include-uri href="http://hardcoded.com/">

or

<util:include-uri>
   <util:href>
  (dynamically generate a URL here)
   </util:href>
</util:include-uri>

Next time, "Use The Source, Luke" ;) - you might immediately realise what 
the problem is. The sources for the taglibs are in 
src/org/apache/cocoon/processor/xsp/library/java


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message