cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: data from url into java String
Date Wed, 08 May 2002 16:51:46 GMT
> From: Jon Williams [mailto:jon@ulanguzi.com]
> 
> I've made a great deal of progress on this problem already, but i seem
to
> have hit a snag.
> 
> i have this line in my XSP:
> 
> <cinclude:include
> src="http://localhost:8080/exist/modify_rank/includeXmlTest.xsp" />
> 
> which causes the include of data that looks like:
> 
> <xsp:logic>
> String xml="&lt;/content&gt;";
> </xsp:logic>
> 
> alas, cincludes appear to be processed *after* the XSP page is
compiled

Of course. If you have <map:generate type="serverpages"> and then
<map:transform type="xinclude"/> - it executed *exactly* in this order.


> and so i end up with the above XML in my output stream, rather than it
> being executed along with the rest of the XSP page.
> 
> just fyi, what i'm going for is to get "entity-fied" XML (via
> xml-to-string.xsl)
> into a java variable, so i can pass it to a taglib that saves it into
an XML
> repository.
> 
> So what i really need, is to get dynamic text (XML in this case) into
a Java
> string at runtime...
> and here i thought i almost had it... isn't there a
load_String_from_URL
> method somewhere???

Resolve your source using resolver (resolver.resolve(sURL)), and then
you can use XSPUtil.getContents(source.getInputStream()).

But personally, I would avoid using methods taking String instead of
Source (except may be for really small XML fragments).

Another thing to avoid is http:// pointing to the same Cocoon instance -
it's just ineffective.


> i've been reading the archives for months -- thanks for the kickin'
resource

PS Read some recent email about XSP to get what and when compiled.

Vadim


> :j


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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