cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lock, Fred" <FL...@mailgo.com>
Subject RE: Including XML output from remote sources via XSP?
Date Fri, 07 Jul 2000 17:16:41 GMT
One way to include XML content from remote sources is to use the
<util:include-uri> library tag. Here's an example:

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

<xsp:page
 xmlns:xsp="http://www.apache.org/1999/XSP/Core"
 xmlns:util="http://www.apache.org/1999/XSP/Util"
>
 <page>
  <table>
   <util:include-uri href="http://www.someserver.com/periodic_table.xml"/>
  </table>
 </page>
</xsp:page>

Fred

-----Original Message-----
From: Schweigl, Johann [mailto:Johann.Schweigl@softwareag.com]
Sent: Friday, July 07, 2000 4:54 AM
To: Cocoon Users List (E-Mail)
Subject: Including XML output from remote sources via XSP?


Hi all,

I'm quite new to Cocoon so maybe the question is already answered many times
but I coulnd't find an sufficient answer. 
My problem is the following: Inside a XSP page I call some java code that
gets data from a remote XML store. The document returned is a complete,
valid XML document. Now I need to feed the whole stuff through Cocoon's XSL
renderer. 

Example:

<?xml version="1.0" encoding="ISO-8859-1"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="response.xsl" type="text/xsl"?>

... <xsp:logic> private String execXQL(String) code </xsp:logic>

<page>
   <xsp:expr>execXQL("some XQL query")</xsp:expr>
<page>

What happens is that the resulting String is not parsed, but rendered as
plain text and output as such. What is the right way to include dynamically
generated XML text into a page so it can be processed by XSL or FO? With
static XQL queries I can use the ENTITY trick, but when the XQL query
parameters come in via a form I'm stuck. Any hints?

Thanx
Johann

---------------------------------------------------------------------
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