cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yeb Havinga <yeb.havi...@ddnh.nl>
Subject Error with util:include-uri and multi-line href
Date Mon, 07 Aug 2000 16:00:27 GMT
Hello all,

I am trying to get the following working

In xslt stylesheet is amongst others:

<xsl:template match="getdoc">
 <util:include-uri>
  
<util:href>http://server/getdoc.xml?name=<xsl:value-ofselect="@name"/>
    <xsl:apply-templates/>
   </util:href>
 </util:include-uri>
</xsl:template>
<xsl:template match="docparm">
 <![CDATA[&]]><xsl:value-of select="@name"/>=<xsl:value-of
select="@value"/>
</xsl:template>

In my xsp document, I should now be able to use:

<getdoc name="foo.html">
	<docparm name="markup" value="green"/>
</getdoc> 

This works if I don't use the docparm tags. If I do use the docparm tag,
the error String not terminated at end of line is thrown by the XSP Java
Compiler. The problem is that the String.valueOf cannot handle line
breaks. And every docparm is added with a newline.

In the generated java servlet the error occurs around the following
code:

    xspCurrentNode.appendChild(
      document.createTextNode("\n\n ")
    );
   {
      String __name =
String.valueOf("http://server/getdoc.xml?name=foo.html
        &markup=green
 ");

      try {  

The & markup is green should obviously be placed right after the
foo.html.

I have two questions:
- is this a good way to translate the getdoc-docparm tags?
- is there a way to circumvent the java error? Should I try to change
org/apache/cocoon/processor/xsp/library/java/util.xsl?


I am using the 20000807101435 snapshot of cocoon 1.8-dev on IBM JDK 1.3
on linux.
(servlet engine is resin 1.1.3)

Thanks!

-- Yeb

Mime
View raw message