cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Guzzi" <guma...@tin.it>
Subject Problems while trying to output a string value as if it were an Xml fragments!
Date Mon, 20 Nov 2000 18:14:32 GMT
Hi.

I'm using Cocoon 1.8 on WINNT 4.0 and Tomcat 3.1.

I have this problem. I've made an XSP page, which does some elaboration. At some point it
gets a string containing some data structured in Xml.

The string looks like this: <doc><elem>Hello</doc></elem>. I'd like
to know how I can output this string in an Xml format, so that I can apply a styleshhet to
it.

The page code is a kind of:


<?xml version="1.0"?> 


<?cocoon-process type="xsp"?> 

<?xml-logicsheet href="logica.xsl"?>

<?cocoon-process type="xslt"?> 

<?xml-stylesheet href="styling.xsl"?> 


<?cocoon-process type="xslt"?> 

<?xml-stylesheet href="fogliodistile.xsl" type="text/xsl"?> 

<xsp:page 

language="java" 

xmlns:xsp="http://www.apache.org/1999/XSP/Core"> 


<page> 

<xsp:logic> 

<!-- I know the following syntax is not correct, but it's just to give an idea of what
I mean--> 

String str="<doc><elem>Hello</elem></doc>";

</xsp:logic> 

<xsp:expr>

str

</xsp:expr>

</page> 

</xsp:page>



Actually, a part from the wrong syntax, the correct version of this page doesn't work the
way I need. It just displays the value as a simple string, without giving me the possibility
to apply a stylesheet to it.



I need to output the string value as if it were an Xml fragment. So the XSP page would output

something like the following Xml fragment:

<doc>

<elem>

Hello

</elem>

</doc>



I hope you can give me your help. Thank you so much. Regards.

Mario Guzzi.


Mime
View raw message