cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjetil Kolin <kjetil.ko...@oracle.com>
Subject Re: JavaBean returning HTML and XSP
Date Wed, 04 Oct 2000 21:00:31 GMT
Hei.

I am modifying the clean-page.xml sample.

I have the following java class:
public class tester extends Object {

  /**
   * Constructor
   */
  public tester() {
  }

  public String returnHello() {
     return "<b>Hello to you</b>";
//     return "Hello to you";
  }
}

I have the following in my xsl file
(Added under the <xsp:logic> section)
...
    public String testMyTest() {
        tester t = new tester();
 return t.returnHello();
     }
...
and the definition of the tag:
...
  <xsl:template match="myTest">
     <xsp:expr>
        testMyTest()
   </xsp:expr>
  </xsl:template>
...
And finally added this tag to the xml page:
...
 <p>Testing</p>

 <myTest/>
 <p>Testing done</p>
...

I get the following result in the webbrowser:

Testing

 <b>Hello to you</b>
Testing done
...

I was expecting that "Hello to you" should come out in bold?

Anyone ?

Thanks in advance
Kjetil

Mime
View raw message