On Tue, 5 Apr 2005, Philipp Suter wrote:
> 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
hi phili
i had similar needs in the past and i have forced to accept a solution
without include xml into xsp
how did your xsp-gennerated-xml look like (without the included xml)?
how will you produce the _generated_xml_
think about to have 2 pipelines that produce a.xml (from xsp) and b.xml
(your dynamicaly generated xml)
one solution is to have a 3rd pipeline that will agregate a.xml and b.xml
and do some xsl tranformation to put things (xml elements) in order you
want.
when you have to do with .xsp try to think that your .xsp must gennerate
simple xml fragments without to use complex java-logic
i understand that what i'm talking about is to far from what you have in
mind but its much _cleaner_
hope that this can help
regards
-stavros s
>
> 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=/[EMAIL PROTECTED]'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: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]