cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Warren <cla...@histio.org>
Subject Embeding XML from java object.
Date Mon, 18 Sep 2000 18:58:25 GMT
Hello,

I have a java object that produces XML output.  This is not a servlet.
I  can not seem to get the XML that is output by the object formatted by
the xsl.  What am I doing wrong???  I am using cocoon 1.7.4, Apache
Server, Apache JServe engine, Linux, IBM java 1.1.8.

XML page:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="test-pre.xsl" type="text/xsl"?>

<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
<xsp:logic>
  Class.forName("com.imaginary.sql.msql.MsqlDriver");
  String dburl = "jdbc:msql://histio.org/hs";
  java.sql.Connection con = java.sql.DriverManager.getConnection(dburl,
"test",
null);
  org.histio.db.Member member = new org.histio.db.Member();
  member.setConnection( con );
  member.setID( "1" );
<xsp:content>
<xsp:expr>
org.histio.util.xml.XMLTranslator.toXML( member )
</xsp:expr>
</xsp:content>
</xsp:logic>
</page>
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>

<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
<xsp:logic>
  Class.forName("com.imaginary.sql.msql.MsqlDriver");
  String dburl = "jdbc:msql://localhost/hs";
  java.sql.Connection con = java.sql.DriverManager.getConnection(dburl,
"test",
null);
  org.histio.db.Member member = new org.histio.db.Member();
  member.setConnection( con );
  member.setID( "1" );
<xsp:content>
<xsp:expr>
org.histio.util.xml.XMLTranslator.toXML( member )
</xsp:expr>
</xsp:content>
</xsp:logic>
</page>
</xsp:page>

The output that I get is the XML from the object.  If I reverse the
order of the <?cocoon-process type="xsp"?> and <?cocoon-process
type="xslt"?> lines I don't even get that.  Any suggestions would be
appreciated



Mime
View raw message