cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: return nodeset from action?
Date Fri, 19 Jul 2002 13:49:28 GMT
> Are you using XSP? Or your own generator?
> 
> If so, could you convert the NodeSet to SAX and insert it into the XML
> stream? Then from XSL, you can get it back as a NodeSet via a global
> <xsl:variable>.

No XSP, the stylesheets have to be able to run without Cocoon if needed.

A generator looks like the most direct solution: have the action pop the
nodeset into the request, have a generator pull it back out.  This is a bit
of a pain since then we have to aggregate the generator output with the rest
of the input and that of course means adding a wrapping element; that in
turn means modifying the stylesheets to pull the two piece out of the
wrapper.  Luckily, there are at most 6 or so places where we need these
chunks of data.

The slightly cleaner alternative (from a non-Cocoon XSLT perspective) would
be to pop the data into the request and have an XSLT extension pull it out
of session and return the nodeset directly.  However, accessing the request
in the extension would be a bit of a kludge at best, if it's even possible?

Somehow it makes me wonder if fixing the bug wouldn't be easier...

>> >> Is it possible to return a parameter containing a NodeSet from a
>> >Cocoon
>> >> action?
>> >
>> > Not via sitemap. Request or session attributes will do.
>>
>> I was afraid of that.
>>
>> [snip]
>>
>> >>
>> >> I suspect the problem is passing the parameter back via the sitemap.
>> >
>> >See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9916
>> >
>>
>> The bug has my vote (2 of them!)  I think choice #3 is probably the way
to
>> go (either a or b).  I was somewhat expecting I might have to do
>> this.  I'll
>> look at seeing if I can pop the necessary data into the request
>> and then get
>> at it from the XSLT, but if it doesn't I may start to dig through this
fix
>> myself...

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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