cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Viana <rvi...@agency.com>
Subject RE: Returning XML from another class
Date Tue, 27 Feb 2001 08:55:21 GMT
Peter,

You can try something like this,
The following is a XSP page that retrieves its XML data source from a Java
class: 

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="sample3.xsl" type="text/xsl"?>
<xsp:page language="java" 
	  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
	  xmlns:util="http://www.apache.org/1999/XSP/Util"
	  >
  <xsp:structure>
       <xsp:include>com.test.des.testbean1.*</xsp:include>
  </xsp:structure>
    <page title="MY TEST">
    <xsp:logic>
        TestBean1 testBean = new TestBean1();
    </xsp:logic>
    <result>
 
<util:include-expr><util:expr>testBean.doXML()</util:expr></util:include-exp
r>
    </result>
  </page>
</xsp:page>

Where "doXML()" is a class member(a method) that returns XML.

Hope this is what you are looking for,

Roberto V.

-----Original Message-----
From: Peter C. Verhage [mailto:petercv@zeelandnet.nl]
Sent: Monday, February 26, 2001 6:15 PM
To: cocoon-users@xml.apache.org
Subject: Returning XML from another class


I want to create a class that returns XML that has to be "embedded" in a
certain Cocoon page... I looked at the FAQ how to do this. There are two
suggestions:



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

Mime
View raw message