cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gould, Troy (ELS)" <>
Subject RE: using XML String in XSP
Date Wed, 28 May 2003 19:28:58 GMT
I've tried your suggestions for whitespace and alternative xml tags (and
attributes) and it still craps out.

The example from Cocoon Developers book (shown below) doesn't even work

String xmlString = "<test>A test value</test>";

Even putting the <xsp:expr/> tag around xmlString doesn't work either.  I've
tried addeding/removing whitespace all over the place and still not working.

The generated .java code for the .xsp file is just putting the following in
the code:
String xmlString = "

which is where I see the errors in the log files.

Seems like a definite bug.

I'm to the point where I'd rather just write my own Transformer.   Seems
like a bug like this has to be a show stopper for a lot of people.  

-----Original Message-----
From: Christian Haul []
Sent: Wednesday, May 28, 2003 3:23 AM
Subject: Re: using XML String in XSP

On 27.May.2003 -- 04:47 PM, Gould, Troy (ELS) wrote:
> I'm using cocoon 2.0.4 and having difficulties with the
> xsp-util:include-expr and xsp:expr tags.
> I have a method in a class that returns a XML Document as a String which I
> want to utilize within an xsp page.  However, I don't want the string to
> come back as text because the '<' tag (and others) will be escaped as
> I want the returned xml string to become part of the SAX stream.

> Then, I went to using:
> <xsp:logic>
> String testDoc = WebServiceClient.getDocument("testDoc.xml");
> <content>
> </content>       

(mind the whitespace!) or

  <util:include-expr expr="testDoc"/>

> </xsp:logic>
> All this was doing was printing out XML with util:include-expr and
> as tags.  The tag processor seems to not be processing my util namespace
> tags.

So, do you use the correct namespace for them? Does your XSP have a
correct structure (e.g. some top level tag starting the page?)

> The real problem is can I use XSP to get a XML Document as a String and
> still have it put into the SAX stream as a Node or do I need to just write
> my own custom generator to do this instead?

This is possible from XSP.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message