cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philipp Suter <p.su...@netbreeze.ch>
Subject Re: 2.1[.7]: XSP: Include XML from Java-[J]DOM
Date Tue, 05 Apr 2005 11:36:35 GMT
Thanks for all the quick answers!

But what I am looking for is generating an xml-document with a 
java-class I can further process in my sitmap. My DB is wrapped and I 
need to filter the data. Therefore the only logical, expandable and 
clean solution is to generate the xml with a java class. The xml would 
be a java-object and not existing as a file on the disc. Has anybody 
done that in cocoon 2.1? (In 1.x it was possible, also in AxKit you can 
or at least could include dynamically generated xml in your xsp)

Cheers and thanks
ph

Andre Juffer wrote:

> Ben Pope wrote:
>
>> Philipp Suter wrote:
>>
>>> Hi
>>>
>>> I am having this simple but serious problem:
>>>
>>> I am loading XML from a XML-Database and want to include some parts 
>>> of the loaded Document into the XSP-page (respectivelly its result).
>>>
>>> How can I include the XML, which I get from a Javaclass by calling 
>>> one of its functions? I tried to include it as a String, but this 
>>> happens to be a String.. Is there any way to include pre-formatted 
>>> XML as a whole in an XSP-page. I only found examples how to include 
>>> text or Strings or Integers, but how do I include XML? A hint to a 
>>> simple example or even the right class in the API could already be 
>>> of great aid.
>>
>>
>>
>> Instead of calling it's function, turn it into a generator or a 
>> transformer and source it with CInclude / XInclude / Aggregation?
>
>
> You could use in your xml document something like:
>
> <xi:include href="persons/?xpath=/person[@id='some-id']" />
>
> and in your sitemap:
>
> <map:match pattern="persons">
>   <map:match type="request-parameter" pattern="xpath">
>     <map:generate src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>     <map:serialize />
>   </map:match>
>   <map:generate src="xmldb:xindice://localhost:8080/db/{1}"/>
>   <map:serialize />
> </map:match>
>
>>
>> Ben
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message