You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mario Guzzi <gu...@tin.it> on 2000/11/20 19:14:32 UTC
Problems while trying to output a string value as if it were an Xml fragments!
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.
Re: Problems while trying to output a string value as if it were an
Xml fragments!
Posted by Uli Mayring <ul...@denic.de>.
On Mon, 20 Nov 2000, Mario Guzzi wrote:
> String str="<doc><elem>Hello</elem></doc>";
Short of using the xspParser to parse it and append it to the current
node, I really don't know.
Ulrich
--
Ulrich Mayring
DENIC eG, Softwareentwicklung