cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armaz Mellati" <Armaz.Mell...@uninett.no>
Subject RE: 2.1[.7]: XSP: Include XML from Java-[J]DOM
Date Tue, 05 Apr 2005 13:25:18 GMT
Hi

I am surprised why nobody suggestet using the <util:include-expr expr="the_text_presentation_of_your_xml"/>
in your xsp ? It is one
of the functions of the XSP UTIL stylesheet. You just have to include its namespace at the
begining of your XSP (like any other
Logicsheet you use) xmlns:util="http://apache.org/xsp/util/2.0" 


Regards,
Armaz

 

> -----Original Message-----
> From: Philipp Suter [mailto:p.suter@netbreeze.ch] 
> Sent: Tuesday, April 05, 2005 1:59 PM
> To: users@cocoon.apache.org
> Subject: Re: 2.1[.7]: XSP: Include XML from Java-[J]DOM
> 
> Cleaner?
> well maybe, but it is tremendously slow (too many disc 
> interactions). I 
> will solve my problem with a custom generator.
> 
> Cheers
> ph
> 
> gounis@osmosis.gr wrote:
> 
> >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=/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
> >>
> >>
> >>    
> >>
> >
> >
> >---------------------------------------------------------------------
> >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
> 


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


Mime
View raw message